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
/workspaces/{workspaceId}/channels/{channelId}/calls
Get a list of calls from a channel
Queryparameters
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
startAt
string
Start date for the query
endAt
string
End date for the query
status
string
Possible values: accepted, starting, ringing, ongoing, completed, busy, no-answer, failed, cancelled, scheduled
type
string
Possible values: pstn, sip, webrtc
to
string
from
string
duration
integer
direction
string
Possible values: incoming, outgoing
id
string
The ID for a call
tag
array
Filter based on tag
Antwoord-payload
results
array of object
Onderliggende attributen tonen
results.id
string
verplicht
results.channelId
string
verplicht
results.from
string
verplicht
results.to
string
verplicht
results.originator
object
verplicht
Onderliggende attributen tonen
results.originator.contact
object
Onderliggende attributen tonen
results.originator.contact.id
string
verplicht
results.originator.contact.identifierKey
string
verplicht
results.originator.contact.identifierValue
string
verplicht
results.originator.number
object
verplicht
Onderliggende attributen tonen
results.originator.number.type
string
verplicht
Possible values: pstn, sip, webrtc
results.originator.number.number
string
verplicht
results.originator.number.anonymous
boolean
results.originator.number.callerIdName
string
results.originator.number.identity
string
results.originator.number.countryIsoCode
string
results.originator.number.pstnNumberType
string
results.receiver
object
verplicht
Onderliggende attributen tonen
results.receiver.contact
object
Onderliggende attributen tonen
results.receiver.contact.id
string
verplicht
results.receiver.contact.identifierKey
string
verplicht
results.receiver.contact.identifierValue
string
verplicht
results.receiver.number
object
verplicht
Onderliggende attributen tonen
results.receiver.number.type
string
verplicht
Possible values: pstn, sip, webrtc
results.receiver.number.number
string
verplicht
results.receiver.number.anonymous
boolean
results.receiver.number.callerIdName
string
results.receiver.number.identity
string
results.receiver.number.countryIsoCode
string
results.receiver.number.pstnNumberType
string
results.parentId
string
results.direction
string
verplicht
Possible values: incoming, outgoing
results.status
string
verplicht
Possible values: accepted, starting, ringing, ongoing, completed, busy, no-answer, failed, cancelled, scheduled
results.reason
string
results.type
string
verplicht
Possible values: pstn, sip, webrtc
results.duration
integer
results.hangupCauseCode
integer
results.hangupSource
string
Possible values: callee, caller, api, timeout, media-timeout, none
results.hangupSipCode
string
results.createdAt
string
verplicht
results.updatedAt
string
verplicht
results.ringingAt
string
results.answeredAt
string
results.endedAt
string
results.scheduledFor
string
results.callFlow
object
Onderliggende attributen tonen
results.callFlow.id
string
results.callFlow.commands
array of object
Onderliggende attributen tonen
results.callFlow.commands.id
string
results.callFlow.commands.callId
string
results.callFlow.commands.callFlowId
string
results.callFlow.commands.status
string
results.callFlow.commands.command
string
results.callFlow.commands.conditions
array of object
Onderliggende attributen tonen
results.callFlow.commands.conditions.variable
string
Possible values: keys, speech
results.callFlow.commands.conditions.operator
string
Possible values: eq, ne, ==, !=, contains
results.callFlow.commands.conditions.value
string
results.notification
object
Onderliggende attributen tonen
results.notification.url
string
results.qualityInsights
object
Onderliggende attributen tonen
results.qualityInsights.mos
string
results.qualityInsights.pdd
string
results.sipInsights
object
Onderliggende attributen tonen
results.sipInsights.hangupSipCode
string
results.sipInsights.edgeRegion
string
results.sipInsights.providerName
string
results.sipInsights.userAgent
string
results.sipInsights.remoteSignallingIp
string
results.sipInsights.remoteMediaIp
string
results.amdResult
object
Onderliggende attributen tonen
results.amdResult.result
string
Possible values: human, machine, noSpeech, beep, unknown
results.amdResult.speech
string
results.amdResult.locale
string
results.sipType
string
Possible values: elastic, byoc, forward
results.tags
array of string
Tags to associate with the call. Tags are converted to lower case and tags
that do not exist are automatically created. You can view your created tags
in the UI. You can specify up to 10 tags per call.
nextPageToken
string
The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.
Codevoorbeeld
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'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.
Codevoorbeeld
curl "/workspaces/{workspaceId}/channels/{channelId}/calls" \
-H 'Authorization: AccessKey YOUR_SECRET_TOKEN'
Codevoorbeeld
// N/A
Codevoorbeeld
{
"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
Codevoorbeeld
curl "GET /workspaces/{workspaceId}/channels/{channelId}/calls?startAt=2024-02-28T16%3A54%3A33.241Z&endAt=2024-03-01T16%3A54%3A33.241Z" \
-H 'Authorization: AccessKey YOUR_SECRET_TOKEN'
Codevoorbeeld
// N/A
Codevoorbeeld
{
"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"
}
]
}