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

Authorizations
Path parameters
workspaceIdstring · uuidrequired

The ID of the workspace

channelIdstring · uuidrequired

The ID for a channel

Query parameters
limitinteger · min: 1 · max: 1000 · default: 10

Limits the number of results to return

pageTokenstring · max: 8000

Pagination token that keeps of track of the current position in the list

startAtstring · date-time

Start date for the query

endAtstring · date-time

End date for the query

statusstring · enum
Options: accepted, starting, ringing, ongoing, completed, no-answer, busy, failed, cancelled, scheduled
typestring · enum
Options: pstn, sip, webrtc
tostring · min: 1 · max: 100
fromstring · min: 1 · max: 100
durationinteger
directionstring · enum
Options: incoming, outgoing
idstring · uuid

The ID for a call

tagstring[]

Filter based on tag

Responses
curl -L \
  --url '/workspaces/{workspaceId}/channels/{channelId}/calls' \
  --header 'Authorization: Bearer jwt'
{
  "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": true,
          "callerIdName": "text",
          "identity": "text",
          "countryIsoCode": "text",
          "pstnNumberType": "text"
        }
      },
      "receiver": {
        "contact": {
          "id": "text",
          "identifierKey": "text",
          "identifierValue": "text"
        },
        "number": {
          "type": "pstn",
          "number": "text",
          "anonymous": true,
          "callerIdName": "text",
          "identity": "text",
          "countryIsoCode": "text",
          "pstnNumberType": "text"
        }
      },
      "parentId": "123e4567-e89b-12d3-a456-426614174000",
      "direction": "incoming",
      "status": "accepted",
      "reason": "text",
      "type": "pstn",
      "duration": 1,
      "hangupCauseCode": 1,
      "hangupSource": "callee",
      "hangupSipCode": "text",
      "createdAt": "2025-02-21T18:02:55.164Z",
      "updatedAt": "2025-02-21T18:02:55.164Z",
      "ringingAt": "2025-02-21T18:02:55.164Z",
      "answeredAt": "2025-02-21T18:02:55.164Z",
      "endedAt": "2025-02-21T18:02:55.164Z",
      "scheduledFor": "2025-02-21T18:02:55.164Z",
      "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",
            "conditions": [
              {
                "value": "text",
                "variable": "keys",
                "operator": "eq"
              }
            ]
          }
        ]
      },
      "notification": {
        "url": "text"
      },
      "qualityInsights": {
        "mos": "text",
        "pdd": "text"
      },
      "sipInsights": {
        "hangupSipCode": "text",
        "edgeRegion": "text",
        "providerName": "text",
        "userAgent": "text",
        "remoteSignallingIp": "text",
        "remoteMediaIp": "text"
      },
      "amdResult": {
        "speech": "text",
        "locale": "text",
        "result": "human"
      },
      "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

Was this helpful?