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}'
// N/A
{
"results": [
{
"id": "4fc2edf7-68f5-437a-89eb-3ce0095409d6",
"channelId": "a739d30b-8171-471c-9df4-591d4dd7bee5",
"originator": {
"number": {
"type": "webrtc",
"number": "fc0be2c4-d3a2-458b-9a98-69ff811ee306",
"callerIdName": "fc0be2c4-d3a2-458b-9a98-69ff811ee306",
"identity": "+3197004499437"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "351927549927",
"countryIsoCode": "PT",
"pstnNumberType": "mobile"
}
},
"from": "client:fc0be2c4-d3a2-458b-9a98-69ff811ee306",
"to": "351927549927",
"direction": "incoming",
"status": "completed",
"type": "webrtc",
"duration": 6,
"hangupCauseCode": 16,
"hangupSource": "caller",
"sipInsights": {
"hangupSipCode": "200",
"userAgent": "MessageBird webRTC 1.0"
},
"qualityInsights": {
"mos": "4.47",
"pdd": "1.23"
},
"createdAt": "2023-10-26T15:26:46.543Z",
"updatedAt": "2023-10-26T15:26:53.779Z",
"ringingAt": "2023-10-26T15:26:47.77Z",
"answeredAt": "2023-10-26T15:26:47.77Z",
"endedAt": "2023-10-26T15:26:53.62Z"
},
{
"id": "85d18e36-a741-46eb-baa7-525e576abbc8",
"channelId": "a739d30b-8171-471c-9df4-591d4dd7bee5",
"originator": {
"number": {
"type": "pstn",
"number": "3197004499437",
"identity": "+3197004499437",
"countryIsoCode": "NL",
"pstnNumberType": "mobile"
}
},
"receiver": {
"contact": {
"id": "79598230-266d-476a-b9ec-7933e006ded6",
"identifierKey": "phonenumber",
"identifierValue": "+351927549927"
},
"number": {
"type": "pstn",
"number": "351927549927",
"countryIsoCode": "PT",
"pstnNumberType": "mobile"
}
},
"from": "3197004499437",
"to": "351927549927",
"parentId": "41bd96c0-1fbc-4ef7-b7bf-7571015b0380",
"direction": "outgoing",
"status": "completed",
"type": "pstn",
"duration": 7,
"hangupCauseCode": 16,
"hangupSource": "callee",
"sipInsights": {
"hangupSipCode": "200"
},
"qualityInsights": {
"mos": "4.50",
"pdd": "3.37"
},
"createdAt": "2023-10-26T14:55:46.214Z",
"updatedAt": "2023-10-26T14:56:00.181Z",
"ringingAt": "2023-10-26T14:55:49.582Z",
"answeredAt": "2023-10-26T14:55:52.679Z",
"endedAt": "2023-10-26T14:55:59.929Z"
}
]
}
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}'
// N/A
{
"nextPageToken": "WzE3MDkzMTA5MDgyNjksIjcxMTgwYjNlLWI1MDktNDRiNS1iN2IzLTIyNjQwNTI1ZTU4MCJd",
"results": [
{
"id": "861bb6cf-3edd-4ed2-837a-5cdf7b88a59c",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "9.32"
},
"createdAt": "2024-03-01T16:48:48.873Z",
"updatedAt": "2024-03-01T16:49:48.254Z",
"ringingAt": "2024-03-01T16:48:58.194Z",
"answeredAt": "2024-03-01T16:48:58.191Z",
"endedAt": "2024-03-01T16:49:48.082Z"
},
{
"id": "59b7f69f-f871-4166-9f33-fdf28886c268",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 16,
"hangupSource": "none",
"sipInsights": {
"hangupSipCode": "487"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "0.00"
},
"createdAt": "2024-03-01T16:48:08.17Z",
"updatedAt": "2024-03-01T16:48:11.209Z",
"endedAt": "2024-03-01T16:48:11.059Z"
},
{
"id": "a78dd93c-08fb-450b-8651-0def9cf77cf9",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "completed",
"type": "pstn",
"duration": 6,
"hangupCauseCode": 16,
"hangupSource": "api",
"callFlow": {
"id": "c4b84cee-66bb-4f1f-b43c-4b63be02ef84",
"commands": [
{
"id": "2c27c266-856d-4ae2-abfe-19a3388bdfaf",
"callId": "a78dd93c-08fb-450b-8651-0def9cf77cf9",
"command": "ringing",
"status": "accepted",
"callFlowId": "c4b84cee-66bb-4f1f-b43c-4b63be02ef84"
},
{
"id": "f39efa8f-5c8e-40f1-99a2-9b3eab040734",
"callId": "a78dd93c-08fb-450b-8651-0def9cf77cf9",
"command": "pause",
"status": "accepted",
"callFlowId": "c4b84cee-66bb-4f1f-b43c-4b63be02ef84"
},
{
"id": "1d093dc0-3646-49d5-9125-939da797961a",
"callId": "a78dd93c-08fb-450b-8651-0def9cf77cf9",
"command": "answer",
"status": "accepted",
"callFlowId": "c4b84cee-66bb-4f1f-b43c-4b63be02ef84"
},
{
"id": "57f960c6-455f-4884-b4de-fc017c0f1be3",
"callId": "a78dd93c-08fb-450b-8651-0def9cf77cf9",
"command": "say",
"status": "accepted",
"callFlowId": "c4b84cee-66bb-4f1f-b43c-4b63be02ef84"
},
{
"id": "cf8a8557-f3ba-41a5-a21f-2543f7268380",
"callId": "a78dd93c-08fb-450b-8651-0def9cf77cf9",
"command": "hangup",
"status": "accepted",
"callFlowId": "c4b84cee-66bb-4f1f-b43c-4b63be02ef84"
}
]
},
"sipInsights": {
"hangupSipCode": "200",
"edgeRegion": "eu-west-1",
"providerName": "Test-MB-VPN"
},
"qualityInsights": {
"mos": "4.50",
"pdd": "11.22"
},
"createdAt": "2024-03-01T16:46:50.158Z",
"updatedAt": "2024-03-01T16:47:10.193Z",
"ringingAt": "2024-03-01T16:47:01.374Z",
"answeredAt": "2024-03-01T16:47:03.791Z",
"endedAt": "2024-03-01T16:47:10.028Z"
},
{
"id": "4d02b72b-8a16-42ae-9b3d-6d4d78941240",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "completed",
"type": "pstn",
"duration": 7,
"hangupCauseCode": 16,
"hangupSource": "api",
"callFlow": {
"id": "bf3458bc-8c36-4635-b2ce-c4e2f215d7e9",
"commands": [
{
"id": "f156256a-a02b-4583-911c-79ee4d195c51",
"callId": "4d02b72b-8a16-42ae-9b3d-6d4d78941240",
"command": "ringing",
"status": "accepted",
"callFlowId": "bf3458bc-8c36-4635-b2ce-c4e2f215d7e9"
},
{
"id": "a35508dc-0d19-4e72-841e-687f00162400",
"callId": "4d02b72b-8a16-42ae-9b3d-6d4d78941240",
"command": "answer",
"status": "accepted",
"callFlowId": "bf3458bc-8c36-4635-b2ce-c4e2f215d7e9"
},
{
"id": "cfdf1e4e-f0f3-4eaf-9414-c98c50a54ec7",
"callId": "4d02b72b-8a16-42ae-9b3d-6d4d78941240",
"command": "say",
"status": "accepted",
"callFlowId": "bf3458bc-8c36-4635-b2ce-c4e2f215d7e9"
},
{
"id": "e12accfd-1b2b-40de-9899-a9a75f4678b4",
"callId": "4d02b72b-8a16-42ae-9b3d-6d4d78941240",
"command": "hangup",
"status": "accepted",
"callFlowId": "bf3458bc-8c36-4635-b2ce-c4e2f215d7e9"
}
]
},
"sipInsights": {
"hangupSipCode": "200",
"edgeRegion": "eu-west-1",
"providerName": "Test-MB-VPN"
},
"qualityInsights": {
"mos": "4.50",
"pdd": "22.20"
},
"createdAt": "2024-03-01T16:44:05.639Z",
"updatedAt": "2024-03-01T16:44:34.396Z",
"ringingAt": "2024-03-01T16:44:27.843Z",
"answeredAt": "2024-03-01T16:44:28.021Z",
"endedAt": "2024-03-01T16:44:34.249Z"
},
{
"id": "c78fb160-5ed0-473c-8dce-0c72e3a9d3e0",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"callFlow": {
"id": "89d22003-4276-4a67-a9f6-102da61e44c9",
"commands": [
{
"id": "0f8026e6-534b-4477-a075-1d84b8ab0f3b",
"callId": "c78fb160-5ed0-473c-8dce-0c72e3a9d3e0",
"command": "ringing",
"status": "accepted",
"callFlowId": "89d22003-4276-4a67-a9f6-102da61e44c9"
},
{
"id": "855ded01-4d32-423d-b105-0e005f620b64",
"callId": "c78fb160-5ed0-473c-8dce-0c72e3a9d3e0",
"command": "answer",
"status": "accepted",
"callFlowId": "89d22003-4276-4a67-a9f6-102da61e44c9"
}
]
},
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "52.14"
},
"createdAt": "2024-03-01T16:42:43.258Z",
"updatedAt": "2024-03-01T16:43:43.235Z",
"ringingAt": "2024-03-01T16:43:35.395Z",
"answeredAt": "2024-03-01T16:43:35.613Z",
"endedAt": "2024-03-01T16:43:43.068Z"
},
{
"id": "3b491da7-9fa2-4b38-9696-06ce8c79ffe6",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"callFlow": {
"id": "a4f34275-d69f-4ca4-8e86-6e2e50079e26",
"commands": [
{
"id": "2dd2fad3-a849-494c-b4e9-0abf08f3aa57",
"callId": "3b491da7-9fa2-4b38-9696-06ce8c79ffe6",
"command": "say",
"status": "accepted",
"callFlowId": "a4f34275-d69f-4ca4-8e86-6e2e50079e26"
}
]
},
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "6.89"
},
"createdAt": "2024-03-01T16:41:39.355Z",
"updatedAt": "2024-03-01T16:42:39.26Z",
"ringingAt": "2024-03-01T16:41:46.247Z",
"endedAt": "2024-03-01T16:42:39.076Z"
},
{
"id": "28fb6fd6-adde-4d75-81eb-2bf2afa66000",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "0.00"
},
"createdAt": "2024-03-01T16:40:27.226Z",
"updatedAt": "2024-03-01T16:41:27.3Z",
"endedAt": "2024-03-01T16:41:27.11Z"
},
{
"id": "3262d64e-304a-4771-b3b8-91e895dd02ac",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "0.00"
},
"createdAt": "2024-03-01T16:38:31.357Z",
"updatedAt": "2024-03-01T16:39:31.258Z",
"endedAt": "2024-03-01T16:39:31.077Z"
},
{
"id": "6cd8342b-66e6-4358-88f7-b626e29c9365",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "0.00"
},
"createdAt": "2024-03-01T16:36:49.102Z",
"updatedAt": "2024-03-01T16:37:48.292Z",
"endedAt": "2024-03-01T16:37:48.081Z"
},
{
"id": "71180b3e-b509-44b5-b7b3-22640525e580",
"channelId": "db53c357-92e3-4f3d-babe-159573940a50",
"originator": {
"contact": {
"id": "1ea5d8c8-3f5e-4cc0-bb92-47b099d317c0",
"identifierKey": "phonenumber",
"identifierValue": "+351910648518"
},
"number": {
"type": "pstn",
"number": "+351910648518",
"callerIdName": "Jose G",
"countryIsoCode": "PT"
}
},
"receiver": {
"number": {
"type": "pstn",
"number": "+3197058016589",
"countryIsoCode": "NL"
}
},
"from": "+351910648518",
"to": "+3197058016589",
"direction": "incoming",
"status": "no-answer",
"type": "pstn",
"duration": 0,
"hangupCauseCode": 19,
"hangupSource": "none",
"sipInsights": {
"hangupSipCode": "480"
},
"qualityInsights": {
"mos": "0.00",
"pdd": "0.00"
},
"createdAt": "2024-03-01T16:35:08.269Z",
"updatedAt": "2024-03-01T16:36:08.292Z",
"endedAt": "2024-03-01T16:36:08.084Z"
}
]
}
Last updated