Skip to main content
POST
Create voice agent
The Update Voice Agent API uses the same request/response shape as Create Voice Agent, but you must include agent_id to identify which agent to update. Only agent_id is required — include any other fields you want to change, including status to draft, publish, or delete the agent.

API Endpoint

POST /api/v1/global/create-agent Content-Type: application/json Authentication: Required (Token header: token)

Request Body

Required Fields

Optional Fields

All other fields follow the same definitions as the Create Voice Agent API — include only the fields you want to update.

Status

Pass status on its own (just agent_id + status) to draft, publish, or delete the agent without touching anything else:
New agents are created in Draft (status: 3) by default — see Create Voice Agent. Publishing (status: 1) a voice agent (AGENT_TYPE = 3) requires it to already have at least one active, workspace-owned phone number attached — see Attach Phone Number. Numbers from a shared/global provider don’t count.

Response

Success Response

Status Code: 200 OK

Error Responses

400 Bad Request

Also returned for status changes:

401 Unauthorized

404 Not Found

422 Unprocessable Entity

Example Requests

Notes

  • Only include fields you want to update; omitted fields will remain unchanged.
  • The agent must exist and belong to your workspace.
  • For available options for voice.provider, speech_to_text.provider, speech_to_text.language, llm models, and tts_model, refer to the Create Voice Agent API documentation.
  • The agent_id can be provided either in the request body or as a query parameter.
  • status can be sent alone or alongside other field changes — see Status above.

Headers

token
string
required

API token for authentication

Body

application/json
agent_id
integer

ID of an existing agent to update. Omit to create a new agent.

agent_name
string
description
string
prompt
string
timezone
string
greeting
string
session_data_webhook
string
voice
object
speech_to_text
object
llm
object
configurations
object
status
enum<integer>

1 = Active/Published, 2 = Deleted, 3 = Draft/Unpublished. New agents default to 3 (Draft) when omitted. Publishing (1) a voice agent (AGENT_TYPE 3) requires at least one active, workspace-owned phone number already attached.

Available options:
1,
2,
3

Response

201

Created