GET — Get Events for a Leg
Description
Retrieve all external events generated for a specific Leg, including lifecycle events and action-level events.
This API is useful for debugging, auditing, and reconstructing the event timeline for a leg.
Method
GET
Endpoint
Full URL
Authentication
Use Basic Authentication.
API credentials can be found in my.exotel.com → Developer Settings.
Request Query Parameters
Parameter Name | Mandatory / Optional | Type | Description |
|---|---|---|---|
event_name | Optional | String | Filters events by a specific event name (e.g., leg_answered, recording_started) |
Sample Request
Sample Request with Filter
Response
Response Parameters
Parameter Name | Type | Description |
|---|---|---|
sid | string | Unique SID of the leg |
event_type | string | Type of event (leg_action_event, leg_lifecycle_event) |
account_sid | string | Account SID associated with the leg |
external_events | array | List of external event objects |
External Event Object
Each item in external_events contains:
Field | Type | Description |
|---|---|---|
endpoint_response | boolean | Whether the event was successfully delivered |
error | string | Error message, if delivery failed |
date_created | string (ISO-8601) | Event creation timestamp |
date_updated | string (ISO-8601) | Event update timestamp |
event_info | object | Detailed event metadata |
Event Info Object
Field | Type | Description |
|---|---|---|
event_sid | string | Unique SID of the event |
event_type | string | Event type (leg_action_event, leg_lifecycle_event) |
event_name | string | Name of the event |
event_timestamp | object | Timestamp when the event occurred |
action_sid | string | Associated action SID |
action_custom_parameter | string | Custom parameter passed during action execution |
data | object | Event-specific payload |
Sample Response
Notes for Developers
- Events are returned in chronological order
- This API is read-only and does not affect leg execution
- Useful for:
- Debugging failed actions
- Verifying event delivery
- Building event-replay or analytics pipelines