---
title: "Update Canary Deploy"
method: PUT
path: "/ai/assistants/{assistant_id}/canary-deploys"
tags: ["Assistants"]
---

# Update Canary Deploy

`PUT /ai/assistants/{assistant_id}/canary-deploys`

Endpoint to update a canary deploy configuration for an assistant.

Updates the existing canary deploy configuration with new version IDs and percentages.
  All old versions and percentages are replaces by new ones from this request.

## Path parameters

- `assistant_id` string, required

## Request body

- CanaryDeployRequest — Create/update request body. Accepts: - ``rules`` — canonical ordered list of routing rules
  - `rules` RuleInput[]
    - `match` Clause[]
      - `attribute` string, required — Attribute name from the routing context
      - `operator` 'in' | 'not_in' | 'starts_with', required
      - `values` string[], required
    - `serve` Serve, required — What a rule serves when matched. Exactly one of: - ``version_id`` — serve a specific version - ``rollout`` — weighted random across versions; weights must sum to less than 100, with the leftover routing to the main version
      - `version_id` string
      - `rollout` RolloutSlot[]
        - `version_id` string, required
        - `weight` number, required

## Response `200`

Successful Response

- CanaryDeployResponse — Response shape. Always carries ``rules`` (canonical).
  - `assistant_id` string, required
  - `rules` RuleOutput[], required
    - `match` Clause[]
      - `attribute` string, required — Attribute name from the routing context
      - `operator` 'in' | 'not_in' | 'starts_with', required
      - `values` string[], required
    - `serve` Serve, required — What a rule serves when matched. Exactly one of: - ``version_id`` — serve a specific version - ``rollout`` — weighted random across versions; weights must sum to less than 100, with the leftover routing to the main version
      - `version_id` string
      - `rollout` RolloutSlot[]
        - `version_id` string, required
        - `weight` number, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api/revisions/e32d46c5945b/schema)
