Skip to content
gist.link ↗

voicemails

Query Phone API — POST https://phone.api.gist.link/graphql

The voicemails query on the Phone API.

phone:query:voicemails

The calling IAM key must hold this permission (or a wildcard that covers it: phone:query:* or phone:*) and the access token must have been minted with audience=phone. See Permissions.

type Query {
voicemails(filter: VoicemailFilter, first: Int, after: String): VoicemailConnection!
}
Argument Type Required Description
filter VoicemailFilter No —
first Int No —
after String No —

VoicemailConnection! — see the Phone types reference.

Terminal window
curl https://phone.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Voicemails($filter: VoicemailFilter, $first: Int, $after: String) { voicemails(filter: $filter, first: $first, after: $after) { totalCount edges { cursor node { uuid recordingUrl durationSeconds transcription isRead handoffState createdAt } } } }",
"variables": {
"filter": {
"numberUuid": "01a01234-abcd-7000-9000-0123456789ab",
"unreadOnly": true,
"contactE164": "example"
},
"first": 10,
"after": "cursor"
}
}
JSON