---
title: Leg details API to get all participants details of a Call
slug: voice-apis/leg-details-api-to-get-all-participants-details-of-a-call
createdAt: 2025-10-11T04:52:22.199Z
---

:::Iframe{iframeHeight="0" code="<div&#xA;              style=&#x22;&#xA;                position: relative;&#xA;                padding-bottom: 56.25%;&#xA;                height: 0;&#xA;                border-radius: 0;&#xA;                box-shadow: 0 15px 40px rgba(63,58,79,.3);&#xA;                overflow: hidden;&#xA;                min-width:320px&#x22;><iframe&#xA;              src=&#x22;https://learn.exotel.com/share/2Vfwa8ls3NZz7cEMIBRIlg/embed?autoplay=false&#x22;&#xA;              frameborder=&#x22;0&#x22;&#xA;              webkitallowfullscreen&#xA;              mozallowfullscreen&#xA;              allowfullscreen&#xA;              allow=&#x22;autoplay; fullscreen&#x22;&#xA;              style=&#x22;position: absolute; top: 0; left: 0; width: 100%; height: 100%;&#x22;></iframe></div>"}

:::

This document outlines an API to query all the participants in the completed calls. The use case where this API will be useful&#x20;

1. Calls where more than 2 participants were there in a call. For Ex:- Dialer, Cold transfer, Connect after connect&#x20;
2. Listen, Whisper or Barge use case. More details of LWB API is here&#x20;

**NOTE:- In Order to use this API, one needs to provide the callSID of the completed call. This is a dependency for the API**

**NOTE:- To enable this API in your account, please reach out to hello\@exotel.com&#x20;**

To get the details of a call , you will need to make a HTTP GET request to&#x20;

https\://\<your\_api\_key>:\<your\_api\_token>@\<subdomain>/v1/Accounts/\~exotel\_sid\~/Calls/\<CallSid>/Legs

- \<CallSid> is the Sid of the call.
- Replace \<your\_api\_key> and \<your\_api\_token> with the API key and token created by you.
- Replace \<your\_sid> with your “Account sid”
- Replace \<subdomain> with the region of your account
  - \<subdomain> of Singapore cluster is api.exotel.com
  - \<subdomain> of Mumbai cluster is api.in.exotel.com

\<your\_api\_key> , \<your\_api\_token> and \<your\_sid> are available in the API settings page of your Exotel Dashboard

In the case of an outbound call originating via the Call APIs (here or here), the "Sid" parameter is returned in the XML response to your request.

In the case of inbound calls, you can get the CallSid by using the Passthru applet.&#x20;

**HTTP Response:**

**On success**, this API will return an HTTP status code of 200 and the response body will contain an XML/JSON (like below) that contains the details of the call.

**On failure**, the HTTP status code will be a non-200 code which indicates the reason (as discussed here ).


**Response Body on Success:**

```json
{

"MetaData":{

"Total":3,

"Count":3

},

"legs":[

{

"Sid":"XXXXXXXXXXXXXX",

"CallSid":"XXXXXXXXXXXXXX",

"AccountSid":"exotelt",

"PhoneNumber":"XXXXXXXXXXXXXX",

"Status":"completed",

"Origin":"outbound",

"LastAction":"",

"DateCreated":"2021-06-24 11:12:39",

"DateUpdated":"2021-06-24 11:13:08",

"OnCallDuration":25,

"Uri":"/v1/Accounts/exotelt/Calls/XXXXXXXXXXXXXX/Legs/XXXXXXXXXXXXXX"

},

{

"Sid":"XXXXXXXXXXXXXX",

"CallSid":"XXXXXXXXXXXXXX",

"AccountSid":"exotelt",

"PhoneNumber":"XXXXXXXXXXXXXX",

"Status":"completed",

"Origin":"outbound-dial",

"LastAction":"",

"DateCreated":"2021-06-24 11:12:48",

"DateUpdated":"2021-06-24 11:12:57",

"OnCallDuration":5,

"Uri":"/v1/Accounts/exotelt/Calls/XXXXXXXXXXXXXX/Legs/XXXXXXXXXXXXXX"

},

{

"Sid":"XXXXXXXXXXXXXX",

"CallSid":"XXXXXXXXXXXXXX",

"AccountSid":"exotelt",

"PhoneNumber":"XXXXXXXXXXXXXX",

"Status":"completed",

"Origin":"outbound-dial",

"LastAction":"",

"DateCreated":"2021-06-24 11:12:58",

"DateUpdated":"2021-06-24 11:13:07",

"StartTime":"2021-06-24 11:12:58",

"EndTime":"2021-06-24 11:13:08",

"ExoPhone":"XXXXXXXXXX",

"BackupEcoPhone":"XXXXXXXXXX",



"OnCallDuration":4,

"Uri":"/v1/Accounts/exotelt/Calls/XXXXXXXXXXXXXX/Legs/XXXXXXXXXXXXXX"

}

]

}
```




The "Status" parameter can take one of the following values:&#x20;

- queued
- in-progress
- completed
- failed
- busy
- no-answer



The "Origin" parameter can take one of the following values:&#x20;

- **Inbound:-&#x20;**&#x43;ustomers dialing into Exotel Virtual number
- **Outbound:-&#x20;**&#x31;st leg of connect API&#x20;
- **Outbound-dial:-&#x20;**&#x53;ubsequent dial out from Exotel platform post 1st leg is established ( either via inbound/outbound)
- **Monitor:-&#x20;**&#x53;upervisor leg performing the Listen / Whisper / Barge actions&#x20;
-



**Response Body on failure:**

```json
{
"RestException":{
"Code":400,
"Message":"Bad Request",
"Description":"Please check the callSID passed"
}
}
```



**Rate Limit:**

This API is rate limited to 200 queries per minute. Once this limit has been crossed, your requests will be rejected with an HTTP 429 'Too Many Requests' code.
