X-Voice-Key header or Authorization: Bearer with the voice public key.
Start session
| Field | Type | Description |
|---|---|---|
userId | string | User identifier |
sessionId | string | App session ID to associate with |
language | string | Language code (e.g., en, zh) |
initialContextPayload | object | Initial context for the voice agent |
toolBridgeBaseUrl | string | Happy Server URL for tool calls |
welcomeMessage | string | Optional custom greeting |
Stop session
| Field | Type | Description |
|---|---|---|
gatewaySessionId | string | Session ID from start response |
Get session status
Send text
| Field | Type | Description |
|---|---|---|
gatewaySessionId | string | Session ID |
text | string | Text to inject |
Send context
| Field | Type | Description |
|---|---|---|
gatewaySessionId | string | Session ID |
payload | object | Context payload (session state, messages, etc.) |