---
title: GET — Get Events for a Leg
slug: voice-apis/get-get-events-for-a-leg
docTags: 
createdAt: 2026-01-20T02:36:56.315Z
---

# 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

:::BlockQuote
/v2/accounts/&#x7B;AccountSID}/legs/&#x7B;LegSID}/external\_events
:::

**Full URL**

:::BlockQuote
https\://cpaas-api.in.exotel.com/v2/accounts/&#x7B;AccountSID}/legs/&#x7B;LegSID}/external\_events
:::

## Authentication

Use **Basic Authentication**.

:::BlockQuote
Authorization: Basic \<BASE64\_APIKEY\_APITOKEN>
:::

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

:::BlockQuote
GET /v2/accounts/&#x7B;AccountSID}/legs/&#x7B;LegSID}/external\_events
:::

### Sample Request with Filter

:::BlockQuote
GET /v2/accounts/&#x7B;AccountSID}/legs/&#x7B;LegSID}/external\_events?event\_name=leg\_answered
:::

## 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

:::BlockQuote
\{
&#x20; "request\_id": "ce7b872225b348f09e80115c1ff569a3",
&#x20; "method": "GET",
&#x20; "http\_code": 202,
&#x20; "response": \{
&#x20;   "error\_data": null,
&#x20;   "data": \{
&#x20;     "sid": "2q47dakkScvff1IbPdpp7KJSe6j00000",
&#x20;     "event\_type": "leg\_lifecycle\_event",
&#x20;     "account\_sid": "sprinklr2m",
&#x20;     "external\_events": \[
&#x20;       \{
&#x20;         "endpoint\_response": true,
&#x20;         "error": "",
&#x20;         "date\_created": "2024-12-11T09:41:21.98089381Z",
&#x20;         "date\_updated": "2024-12-11T09:41:22.186124012Z",
&#x20;         "event\_info": \{
&#x20;           "event\_sid": "2q47dipYPQbEnwgEnNWxrTB6YWb00000",
&#x20;           "event\_type": "leg\_lifecycle\_event",
&#x20;           "event\_name": "channel\_created",
&#x20;           "event\_timestamp": \{
&#x20;             "seconds": 1733148727,
&#x20;             "nanos": 963868626
&#x20;           },
&#x20;           "action\_sid": "2pfEO9kg9YCqUJlbGHjYH2GaJa400000",
&#x20;           "action\_custom\_parameter": "START\_UNI\_STREAM\_ACTION\_CUSTOM\_PARAM",
&#x20;           "data": \{
&#x20;             "account\_sid": "sprinklr2m",
&#x20;             "caller\_id": "08030752501",
&#x20;             "contact\_uri": "09163816622",
&#x20;             "custom\_param": "abc",
&#x20;             "date\_created": "2024-12-11T09:41:21.98089381Z",
&#x20;             "date\_updated": "2024-12-11T09:41:22.186124012Z",
&#x20;             "dc\_code": "101",
&#x20;             "direction": "outbound",
&#x20;             "exophone": "08030752400",
&#x20;             "leg\_sid": "2q47dakkScvff1IbPdpp7KJSe6j00000",
&#x20;             "network\_type": "pstn",
&#x20;             "nso\_code": "a8140aaa-ce40-11ed-9a09-0242ac110003",
&#x20;             "start\_time": "2024-12-11T09:41:22.186124012Z",
&#x20;             "state": "created",
&#x20;             "time\_limit": 14400
&#x20;           }
&#x20;         }
&#x20;       }
&#x20;     ]
&#x20;   }
&#x20; }
}
:::

## Notes for Developers

- Events are returned in **chronological order**&#x20;
- This API is **read-only** and does not affect leg execution&#x20;
- Useful for:&#x20;
  - Debugging failed actions&#x20;
  - Verifying event delivery&#x20;
  - Building event-replay or analytics pipelines
