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
- application/json
Body
required
Array [
]
versions
object[]
required
List of version configurations
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
- application/json
422: Validation Error
- application/json
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"
}
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}