Web calls
Create a web call: start a browser/WebRTC voice session with an agent and receive a connection token. Designed to be called from your frontend so a user can talk to the agent directly in the browser. Provide the agent_id and optionally an identity for the participant, prompt variables, and free-form extra_data; the returned token is used by your WebRTC client to join the live audio session. This is the canonical web-call endpoint; /api/ext/make-web-call is an equivalent alias kept for backward compatibility.
curl --request POST \
--url 'https://api.nabrah.ai/api/ext/web/make-web-call' \
--header 'X-API-Key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "00000000-0000-4000-8000-000000000000"
}'{
"token": "string"
}agent_idUUID of the agent that will answer the web call. Fetch agents with GET /api/ext/agent.
agent_ididentityOptional participant identity for the realtime session — useful to associate the connection with a known user.
identityvariablesOptional key/value map of template variables exposed to the agent's prompt during the session.
variablesextra_dataOptional free-form data injected into the call context.
extra_datatokenConnection token returned for joining the live voice session from a browser/WebRTC client. Short-lived; mint a new one per session.
tokenIdentical backward-compatible alias. Prefer this canonical path (/api/ext/web/make-web-call).
After the session, the web call appears as a call record retrievable by its id.
X-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
Start a web call with just an agent.
{
"agent_id": "00000000-0000-4000-8000-000000000000"
}Successful Response
application/json
Validation Error
application/json