Update a scheduled test job
Updates the specified scheduled test job.
PATCH
/
ai
/
tests
/
schedules
/
v1
/
cron-jobs
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const ScheduledTestJob = await client.ai.tests.schedules.v1.cronJobs.update('id', {
name: 'name',
});
console.log(ScheduledTestJob.id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
scheduled_test_job = client.ai.tests.schedules.v1.cron_jobs.update(
id="id",
name="name",
)
print(scheduled_test_job.id)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
cronJob, err := client.AI.Tests.Schedules.V1.CronJobs.Update(
context.TODO(),
"id",
telnyx.AITestScheduleV1CronJobUpdateParams{
Name: telnyx.String("name"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", cronJob.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.tests.schedules.v1.cronJobs.CronJobUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
CronJobUpdateParams params = CronJobUpdateParams.builder()
.name("name")
.build();
var response = client.ai().tests().schedules().v1().cronJobs().update("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
scheduled_test_job = telnyx.ai.tests.schedules.v1.cron_jobs.update("id", name: "name")
puts(scheduled_test_job)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$scheduled_test_job = $client->ai->tests->schedules->v1->cronJobs->update(
'id',
name: 'name',
);
var_dump($scheduled_test_job);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:tests:schedules:v1:cron-jobs update \
--api-key 'My API Key' \
--id id \
--name namecurl --request PATCH \
--url https://api.telnyx.com/v2/ai/tests/schedules/v1/cron-jobs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Nightly regression - updated",
"notify_on": "both",
"is_active": true,
"crontab_expression": "0 4 * * *"
}
'{
"id": 1188,
"name": "Nightly regression",
"agent": 1259,
"crontab_expression": "0 3 * * *",
"timezone": "America/Chicago",
"scenario_ids": [
9512
],
"scenarios_data": [
{
"id": 9512,
"agent": 1259,
"name": "Refund escalation flow",
"personality": 4643,
"personality_name": "Interruptive (High)"
}
],
"personality": null,
"personalities": [
4643
],
"tags": [
"regression"
],
"frequency": 1,
"run_as_text": false,
"execution_mode": "voice",
"notify_on": "failure",
"is_active": true,
"created_at": "2026-10-13T18:04:05.123456Z",
"updated_at": "2026-10-13T18:04:05.123456Z"
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The AI Tests service rejected the request."
}
]
}{
"errors": [
{
"code": "10003",
"title": "Unauthorized",
"detail": "The API key is missing or invalid."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Not Found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10018",
"title": "Unprocessable Entity",
"detail": "Validation failed for the request payload."
}
]
}{
"errors": [
{
"code": "10029",
"title": "Too Many Requests",
"detail": "Too many requests; retry later."
}
]
}{
"errors": [
{
"code": "10063",
"title": "Service Unavailable",
"detail": "The test framework service is temporarily unavailable."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Numeric ID of the scheduled test job.
Body
application/json
Execution mode for the test runs, such as voice, text, or sip.
Available options:
never, success, failure, both Cron expression controlling when the job runs.
Response
Updated scheduled test job.
ID of the test agent the job belongs to.
Cron expression controlling when the job runs, in the job's timezone.
Scenario IDs the job executes.
Show child attributes
Show child attributes
Whether the job runs scenarios as text chat rather than voice calls.
Execution mode for the test runs, such as voice, text, or sip.
When the job sends a notification.
Available options:
never, success, failure, both Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const ScheduledTestJob = await client.ai.tests.schedules.v1.cronJobs.update('id', {
name: 'name',
});
console.log(ScheduledTestJob.id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
scheduled_test_job = client.ai.tests.schedules.v1.cron_jobs.update(
id="id",
name="name",
)
print(scheduled_test_job.id)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
cronJob, err := client.AI.Tests.Schedules.V1.CronJobs.Update(
context.TODO(),
"id",
telnyx.AITestScheduleV1CronJobUpdateParams{
Name: telnyx.String("name"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", cronJob.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.tests.schedules.v1.cronJobs.CronJobUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
CronJobUpdateParams params = CronJobUpdateParams.builder()
.name("name")
.build();
var response = client.ai().tests().schedules().v1().cronJobs().update("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
scheduled_test_job = telnyx.ai.tests.schedules.v1.cron_jobs.update("id", name: "name")
puts(scheduled_test_job)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$scheduled_test_job = $client->ai->tests->schedules->v1->cronJobs->update(
'id',
name: 'name',
);
var_dump($scheduled_test_job);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:tests:schedules:v1:cron-jobs update \
--api-key 'My API Key' \
--id id \
--name namecurl --request PATCH \
--url https://api.telnyx.com/v2/ai/tests/schedules/v1/cron-jobs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Nightly regression - updated",
"notify_on": "both",
"is_active": true,
"crontab_expression": "0 4 * * *"
}
'{
"id": 1188,
"name": "Nightly regression",
"agent": 1259,
"crontab_expression": "0 3 * * *",
"timezone": "America/Chicago",
"scenario_ids": [
9512
],
"scenarios_data": [
{
"id": 9512,
"agent": 1259,
"name": "Refund escalation flow",
"personality": 4643,
"personality_name": "Interruptive (High)"
}
],
"personality": null,
"personalities": [
4643
],
"tags": [
"regression"
],
"frequency": 1,
"run_as_text": false,
"execution_mode": "voice",
"notify_on": "failure",
"is_active": true,
"created_at": "2026-10-13T18:04:05.123456Z",
"updated_at": "2026-10-13T18:04:05.123456Z"
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The AI Tests service rejected the request."
}
]
}{
"errors": [
{
"code": "10003",
"title": "Unauthorized",
"detail": "The API key is missing or invalid."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Not Found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10018",
"title": "Unprocessable Entity",
"detail": "Validation failed for the request payload."
}
]
}{
"errors": [
{
"code": "10029",
"title": "Too Many Requests",
"detail": "Too many requests; retry later."
}
]
}{
"errors": [
{
"code": "10063",
"title": "Service Unavailable",
"detail": "The test framework service is temporarily unavailable."
}
]
}