---
title: GET — Get Leg Details
slug: voice-apis/get-get-leg-details
docTags: 
createdAt: 2026-01-19T10:29:44.261Z
---

# Description&#x20;

Fetches the current details of a **Leg** using its leg\_sid. This is useful to:

- Check the leg state (created / ringing / connected / terminal)&#x20;
- Fetch timestamps (created / start / end)&#x20;
- Pull additional runtime statuses (bridge / recording / play / gather / hold, etc.) via fields&#x20;

## Endpoint

**GET**

:::BlockQuote
/v2/accounts/&#x7B;account\_sid}/legs/&#x7B;leg\_sid}
:::

## Full URL

:::BlockQuote
https\://cpaas-api.in.exotel.com/v2/accounts/&#x7B;account\_sid}/legs/&#x7B;leg\_sid}
:::

## Authentication

- **Type:** HTTP Basic Authentication&#x20;
- **Username:** API Key&#x20;
- **Password:** API Token&#x20;

## Request Headers

:::BlockQuote
Content-Type: application/json
Authorization: Basic \<base64(API\_KEY\:API\_TOKEN)>
:::

## Path Parameters

| Parameter    | Type   | Required | Description                                |
| ------------ | ------ | -------- | ------------------------------------------ |
| account\_sid | string | Yes      | Exotel Account SID (from Exotel dashboard) |
| leg\_sid     | string | Yes      | Leg SID returned by Create a Leg           |

## Query Parameters (Optional)

### fields

Use fields to request additional runtime statuses in the response.

**Type:** comma-separated string

**Example**

:::BlockQuote
fields=bridge\_status,recording\_status,tx\_audio\_status,rx\_audio\_status,hold\_status,gather\_status,play\_status
:::

| Field             | Description                          |
| ----------------- | ------------------------------------ |
| bridge\_status    | Whether the leg is bridged or not    |
| recording\_status | Whether recording is active          |
| tx\_audio\_status | Transmit audio status (muted/normal) |
| rx\_audio\_status | Receive audio status (muted/normal)  |
| hold\_status      | Whether leg is on hold               |
| gather\_status    | Whether DTMF gather is active        |
| play\_status      | Whether audio playback is active     |

:::BlockQuote
Tip: If you don’t pass fields, the API returns the standard leg object without the additional\_info section.
:::

## Example Request

### Basic request

:::BlockQuote
curl -u "\<API\_KEY>:\<API\_TOKEN>" \\
-X GET \\
https\://cpaas-api.in.exotel.com/v2/accounts/\<account\_sid>/legs/\<leg\_sid>
:::

### Request with fields

:::BlockQuote
curl -u "\<API\_KEY>:\<API\_TOKEN>" \\
-X GET \\
"https\://cpaas-api.in.exotel.com/v2/accounts/\<account\_sid>/legs/\<leg\_sid>?fields=bridge\_status,recording\_status,hold\_status,gather\_status,play\_status"
:::

## Success Response

**HTTP 200 – OK**

:::BlockQuote
\{
&#x20; "request\_id": "ce7b872225b348f09e80115c1ff569a3",
&#x20; "method": "GET",
&#x20; "http\_code": 200,
&#x20; "response": \{
&#x20;   "error\_data": null,
&#x20;   "data": \{
&#x20;     "leg\_sid": "2QYATxQ9t4UKcUwcqJClSa9OEZ400000",
&#x20;     "account\_sid": "ameyo5m",
&#x20;     "contact\_uri": "09163816621",
&#x20;     "exophone": "08030752400",
&#x20;     "caller\_id": "8030752501",
&#x20;     "direction": "outbound",
&#x20;     "network\_type": "pstn",
&#x20;     "time\_limit": 600,
&#x20;     "state": "connected",
&#x20;     "date\_created": "2026-01-19T08:02:32Z",
&#x20;     "date\_updated": "2026-01-19T08:03:06Z",
&#x20;     "start\_time": "2026-01-19T08:02:35Z",
&#x20;     "additional\_info": \{
&#x20;       "recording\_status": "not\_recording",
&#x20;       "hold\_status": "normal",
&#x20;       "gather\_status": "not\_gathering",
&#x20;       "play\_status": "not\_playing",
&#x20;       "bridge\_status": "not\_bridged"
&#x20;     }
&#x20;   }
&#x20; }
}
:::

## Response Fields

### Core Fields

| Field         | Description                                      |
| ------------- | ------------------------------------------------ |
| leg\_sid      | Unique identifier for the leg                    |
| account\_sid  | Exotel account identifier                        |
| contact\_uri  | Destination of the leg (phone/SIP URI)           |
| exophone      | Caller ID / Exotel number used                   |
| caller\_id    | Resolved caller ID presented                     |
| direction     | inbound or outbound                              |
| network\_type | pstn or voip                                     |
| time\_limit   | Max time allowed for the leg                     |
| state         | Current leg state (example: connected, terminal) |
| date\_created | When leg was created                             |
| date\_updated | Last update time                                 |
| start\_time   | When leg connected/started (if applicable)       |

### additional\_info (only if fields requested)

| Field             | Description                          |
| ----------------- | ------------------------------------ |
| recording\_status | Recording status                     |
| hold\_status      | Hold status                          |
| gather\_status    | DTMF gather status                   |
| play\_status      | Playback status                      |
| bridge\_status    | Bridge connection status             |
| tx\_audio\_status | Transmit audio status (if requested) |
| rx\_audio\_status | Receive audio status (if requested)  |

## Error Responses

| HTTP Code | Meaning           | Description                               |
| --------- | ----------------- | ----------------------------------------- |
| 400       | Bad Request       | Invalid fields value or malformed request |
| 401       | Unauthorized      | Invalid API Key / Token                   |
| 403       | Forbidden         | Access not allowed for this account       |
| 404       | Not Found         | Leg SID not found                         |
| 429       | Too Many Requests | Rate limit exceeded                       |
| 500       | Server Error      | Internal error                            |

## Notes & Best Practices

- Use Get Leg Details for **polling** only when needed — prefer events for real-time status&#x20;
- Always log request\_id for debugging&#x20;
- If you need runtime action statuses (play/record/bridge/hold), always pass fields&#x20;
