Create a voice agent
Changed onCreates an agent that answers phone calls through the Sent Voice Gateway. session_type says whether Sent carries the call as text (the caller's speech recognised for the agent, the agent's text spoken) or as audio. With websocket_url the gateway dials your agent for each call and signs the handshake with the signing_secret this response returns; without it, your agent dials in with your API key and this agent's id.
tools, transfer_targets, fallback and limits say what the agent may do on a call. Voices and languages for text sessions come from GET /v3/voice/voices. Calls reach the agent once a number is bound to it on /v3/channels/voice.
signing_secret is shown here and on POST /v3/voice/agents/{id}/rotate-secret only; store it now. With sandbox: true the request is validated and the agent reported with 202; nothing is written.
Request
- Base URLhttps://api.sent.dm
- URLhttps://api.sent.dm/v3/voice/agents
- Auth
- API key in header x-api-key
- or HTTP bearer
Headers
Unique key to ensure idempotent request processing. Must be 1-255 alphanumeric characters, hyphens, or underscores. Responses are cached for 24 hours per key per customer.
Profile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization.
Request body
Example request
{
"name": "Receptionist",
"session_type": "text",
"websocket_url": "wss://agent.example.com/calls",
"greeting": "Thanks for calling Example. How can I help?",
"tools": [
"hangup",
"transfer"
],
"transfer_targets": [
{
"kind": "number",
"value": "+12125550100"
}
],
"sandbox": false
}Response
The agent as stored, with signing_secret
Changes
- info
endpoint added
- info