Skip to main content

Create Canary Deploy

POST 
/ai/assistants/:assistant_id/canary-deploys

Endpoint to create a canary deploy configuration for an assistant.

Creates a new canary deploy configuration with multiple version IDs and their traffic percentages for A/B testing or gradual rollouts of assistant versions.

Request

Path Parameters

    assistant_id Assistant Idrequired

Body

required

    versions

    object[]

    required

    List of version configurations

  • Array [

  • version_id Version Id (string)required

    Version ID string that references assistant_versions.version_id

    percentage Percentage (number)required

    Possible values: < 100

    Percentage of traffic for this version [1-99]

  • ]

  • List of version configurations

Responses

200: Successful Response

422: Validation Error

Request samples


curl -L 'https://api.telnyx.com/v2/ai/assistants/:assistant_id/canary-deploys' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"versions": [
{
"version_id": "string",
"percentage": 0
}
]
}'

Response samples


{
"assistant_id": "string",
"versions": [
{
"version_id": "string",
"percentage": 0
}
],
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}