Voice Agents

Create a WebRTC session for a draft agent

Mints a realtime session without requiring a saved agent — pass a full config inline to talk to a configuration that has not been created yet. This is what the builder's Live Preview uses. Pass agent_id instead to mint a session for a saved agent; that is equivalent to POST /v1/agents/voice/agents/{agent_id}/rooms. The response is bare — it is not wrapped in a data envelope.

POST
/v1/agents/voice/rooms

Authorization

personalAccessToken
AuthorizationBearer <token>

Personal Access Token of a Dynamiq user — the only credential accepted by the management API (api.*). Prefix dyn_pat_ (legacy uak_ tokens still authenticate). Send as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/agents/voice/rooms" \  -H "Content-Type: application/json" \  -d '{}'
{
  "token": "string",
  "room_name": "string",
  "url": "string"
}
{
  "error": {
    "code": "bad_request",
    "message": "Bad Request",
    "details": {
      "input": "cannot be blank"
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  }
}