Skip to main content
POST
Create a new agent within a workspace.
workspaceId is required for account-scoped API keys and inferred from the key for workspace-scoped keys. See Workspace ID and Request Scope.

Common Fields

string
required
Agent name (1-255 characters)
string
required
Type of agent to create. Valid values: Voice, Chat, Widget
string
deprecated
Deprecated — do not send. An agent has no direction: one phone number belongs to one agent, and that number both answers incoming calls and places outgoing ones. The value is still accepted so existing integrations keep working, but it is not stored, and the created agent comes back with direction: null.Creating an agent that places calls requires no special setting. Assign it a phone number and it can both answer and dial.
One exception, and the reason to omit the field rather than pass it: explicitly sending direction: "outbound" still requires an approved KYC status on the account, and returns 403 if the account is not verified. Omitting the field avoids that check entirely.
string
Workspace UUID (required for account API keys, optional for workspace API keys)
string
System prompt for the agent
string
Agent language. Valid values: english, spanish, french, german, portuguese, dutch, chinese, japanese (default: “english”)
boolean
Whether the agent is active (default: true)

Type-Specific Fields

string
Opening line the agent says when starting a conversation
string
Voice ID for text-to-speech
boolean
Enable voicemail detection (default: false). Applies to calls the agent places.
string
Message to leave on voicemail
boolean
Enable background sound (default: true)
boolean
When this is enabled, no logs, recordings, or transcriptions will be stored (default: false)
integer
Maximum call duration in minutes, 1-60 (default: 30)
number
Voice speed multiplier, 0.5-1.5 (default: 1.0)
string
URL to receive a POST request after each conversation ends. The payload includes the transcript, summary, outcome, duration, contact details, and extracted fields. Set to null to disable. See the Post-conversation webhook page for the full payload.
string
deprecated
Deprecated. Use postConversationWebhookUrl instead. Still accepted on input for backwards compatibility; responses always use the new field.