Saltar al contenido principal
PATCH
/
v1
/
agent
/
{agent_id}
/
published_version
Publish Agent Version
import requests

url = "http://localhost:3000/v1/agent/{agent_id}/published_version"

payload = {
    "version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "outbound_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "inbound_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "published_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "outbound_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "inbound_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required

Body

application/json
version_id
string<uuid> | null

The version id to be published. If not provided, the current version published will be unpublished

outbound_phone_number_id
string<uuid> | null

The outbound phone number id to be used by the agent for outbound calls.

inbound_phone_number_id
string<uuid> | null

The inbound phone number id to be used by the agent for inbound calls.

Response

Successful Response

agent_id
string<uuid>
required

The unique identifier for the agent

published_version_id
string<uuid> | null

The version id that was published. If not provided, the agent was unpublished

outbound_phone_number_id
string<uuid> | null

The outbound phone number id to be used by the agent for outbound calls.

inbound_phone_number_id
string<uuid> | null

The inbound phone number id to be used by the agent for inbound calls.