Cumulus TalosDocs
Open Talos
On this page

numbers.update

Assign agents or rename a phone number

Request

PATCH /api/v1/telephony/numbers/{number_id}

  • MCP: numbers_update
  • SDK: client.numbers.update (SDK path arguments use path; MCP uses params).
  • Minimum API key role: admin.
  • Idempotency: natural.

inbound_agent_id pins a published phone agent and the assigning admin's live authority to this number. Enable inbound on its Twilio trunk first and configure the returned inbound_sip_uri in Twilio Origination. Each signed SIP arrival admits one inbound Run; null removes the assignment. Reassign after publishing a new agent version.

Input schema

json
{
  "parameters": [
    {
      "name": "number_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/NumbersUpdateRequest"
        }
      }
    }
  }
}

Responses

json
{
  "200": {
    "description": "Assign agents or rename a phone number",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ByocNumber"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

Referenced schemas

json
{
  "components": {
    "schemas": {
      "NumbersUpdateRequest": {
        "type": "object",
        "properties": {
          "trunk_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[a-z0-9][a-z0-9_-]*$"
          },
          "nickname": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "inbound_agent_id": {
            "allOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            ],
            "nullable": true
          },
          "outbound_agent_id": {
            "allOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            ],
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ByocNumber": {
        "type": "object",
        "properties": {
          "number_id": {
            "type": "string",
            "format": "uuid"
          },
          "e164": {
            "type": "string",
            "pattern": "^\\+[1-9][0-9]{6,14}$"
          },
          "trunk_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[a-z0-9][a-z0-9_-]*$"
          },
          "nickname": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "inbound_agent_id": {
            "allOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            ],
            "nullable": true
          },
          "outbound_agent_id": {
            "allOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            ],
            "nullable": true
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "ready"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "number_id",
          "e164",
          "trunk_id",
          "nickname",
          "inbound_agent_id",
          "outbound_agent_id",
          "state",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}

Errors and recovery

See API error handling and Troubleshooting.

Content version ff995f58Markdown source
numbers.update · Cumulus Talos docs