Create browser voice session

POST/v1/voice-agents/agents/{agentId}/sessions

How to call this endpoint

Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.

Path, query, and header parameters

These parameters control which ACP object the endpoint acts on and how the request is processed.

Path parameters
NameLocationTypeRequiredDescription
agentIdpathstringYesAgent ID
Query parameters
None.

Body schema

Content type: application/json · Optional

FieldTypeRequiredDescription
threadIdstringNoThread ID.
environmentIdstringNoComputer ID.
titlestringNoDisplay title.

What the API returns

Each response code below includes the documented payload shape for the ACP API.

201Voice session and xAI browser connection detailsapplication/json
FieldTypeRequiredDescription
voiceSessionobjectNo
voiceSession.idstringNoUnique identifier.
voiceSession.agentIdstringNoAgent ID.
voiceSession.threadIdstringNoThread ID.
voiceSession.bindingIdstringNo
voiceSession.providerxaiNo
voiceSession.channelweb | phoneNo
voiceSession.statusinitializing | active | completed | failed | cancelledNoCurrent lifecycle status.
voiceSession.xaiCallIdstringNo
voiceSession.xaiSessionIdstringNo
voiceSession.fromNumberstringNo
voiceSession.toNumberstringNo
voiceSession.startedAtstringNoISO 8601 timestamp.
voiceSession.endedAtstringNo
voiceSession.durationSecondsnumberNo
voiceSession.metadataobjectNoFree-form metadata object.
threadobjectNo
xaiobjectNo
xai.realtimeUrlstringNo
xai.clientSecretobjectNo
xai.clientSecret.valuestringNo
xai.clientSecret.expiresAtintegerNo
xai.websocketProtocolstringNo
xai.sessionUpdateobjectNo
Create browser voice session
Loading...
Response 201
Loading...
See the ACP quickstart and SDK flow