List calls from a channel

Use this request to GET a list of all incoming and outgoing calls of a specific channel. You can include additional query parameters to filter the retrieved list.

Get calls from a channel

Get a list of calls from a channel

GET/workspaces/{workspaceId}/channels/{channelId}/calls
Authorization
Path parameters
workspaceId*string (uuid)

The ID of the workspace

channelId*string (uuid)

The ID for a channel

Query parameters
Response

OK

Body
resultsarray of ChannelCall
nextPageTokenstring

The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.

Request
const response = await fetch('/workspaces/{workspaceId}/channels/{channelId}/calls', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "from": "text",
      "to": "text",
      "originator": {
        "contact": {
          "id": "text",
          "identifierKey": "text",
          "identifierValue": "text"
        },
        "number": {
          "type": "pstn",
          "number": "text",
          "anonymous": false,
          "callerIdName": "text",
          "identity": "text",
          "countryIsoCode": "text",
          "pstnNumberType": "text"
        }
      },
      "receiver": {
        "contact": {
          "id": "text",
          "identifierKey": "text",
          "identifierValue": "text"
        },
        "number": {
          "type": "pstn",
          "number": "text",
          "anonymous": false,
          "callerIdName": "text",
          "identity": "text",
          "countryIsoCode": "text",
          "pstnNumberType": "text"
        }
      },
      "parentId": "123e4567-e89b-12d3-a456-426614174000",
      "direction": "incoming",
      "status": "accepted",
      "reason": "text",
      "type": "pstn",
      "duration": 0,
      "hangupCauseCode": 0,
      "hangupSource": "callee",
      "hangupSipCode": "text",
      "createdAt": "2024-12-22T02:33:25.633Z",
      "updatedAt": "2024-12-22T02:33:25.633Z",
      "ringingAt": "2024-12-22T02:33:25.633Z",
      "answeredAt": "2024-12-22T02:33:25.633Z",
      "endedAt": "2024-12-22T02:33:25.633Z",
      "scheduledFor": "2024-12-22T02:33:25.633Z",
      "callFlow": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "commands": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "callId": "123e4567-e89b-12d3-a456-426614174000",
            "callFlowId": "123e4567-e89b-12d3-a456-426614174000",
            "status": "text",
            "command": "text"
          }
        ]
      },
      "notification": {
        "url": "text"
      },
      "qualityInsights": {
        "mos": "text",
        "pdd": "text"
      },
      "sipInsights": {
        "hangupSipCode": "text",
        "edgeRegion": "text",
        "providerName": "text",
        "userAgent": "text",
        "remoteSignallingIp": "text",
        "remoteMediaIp": "text"
      },
      "amdResult": {
        "result": "human",
        "speech": "text",
        "locale": "text"
      },
      "sipType": "elastic",
      "tags": [
        "text"
      ]
    }
  ],
  "nextPageToken": "text"
}

Example 1: List calls from a workspace and a channel

You might consider filtering the call based on the channel and workspace using the available query parameters.

curl "/workspaces/{workspaceId}/channels/{channelId}/calls" \
     -H 'Authorization: Bearer {Token}'

Example 2: List calls from a workspace and a channel filtered by startAt and endAt

curl "GET /workspaces/{workspaceId}/channels/{channelId}/calls?startAt=2024-02-28T16%3A54%3A33.241Z&endAt=2024-03-01T16%3A54%3A33.241Z" \
    -H 'Authorization: Bearer {Token}'

Last updated