---
title: "Switch Agent Version"
method: POST
path: "/agent/switch-agent-version"
---

# Switch Agent Version

`POST /agent/switch-agent-version`

Migrates an agent to use stable release version and updates Twilio voice URL

Args:
    agent_id (str): The ID of the agent to migrate
    version (str): The version to migrate to (defaults to "stable")

Returns:
    dict: Response with status and message
        - On success: {"status": "success", "message": "..."}
        - On error: {"status": "error", "message": "..."}

## Headers

- `authorization` string, nullable
- `x-internal-api-key` string, nullable

## Request body

- AgentVersionRequest
  - `agentId` string, required
  - `version` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/phonely/apis/fastapi.md) · [All operations](https://skmtc.net/phonely/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phonely/fastapi/versions/9bfd5599d479/schema)
