Leg Actions
Description
Leg Actions allow you to control an existing leg after it has been created. Using these actions, you can answer, hang up, play audio, record, gather DTMF, stream audio, bridge calls, and more.
All leg actions are executed via a single Actions API using an EXOML payload.
Authentication
- Type: HTTP Basic Authentication
- Username: API Key
- Password: API Token
Request Headers
Request Body Structure
Field | Type | Required | Description |
|---|---|---|---|
exoml | string | Yes | XML describing the action |
action_custom_param | string | No | Custom value echoed back in events |
Base URL
Example
Common Endpoint
All Leg Actions are executed using:
POST
Full URL
Common Request Body
Parameter | Type | Required | Description |
|---|---|---|---|
action_custom_param | string | No | Custom value echoed back in external events |
exoml | string | Yes | EXOML XML defining the action |
Common Response
HTTP 202 – Accepted
Common Error Responses (applies to all actions)
HTTP Code | Description |
|---|---|
400 | Invalid EXOML or parameters |
401 | Authentication failed |
403 | Not authorized |
404 | Leg not found |
429 | Rate limit exceeded |
500 | Internal server error |
External Events (General)
- Events are delivered asynchronously to the configured leg_event_endpoint (gRPC).
- Each action emits one or more action-specific events (listed in child pages).