Voicemail search
/api/v2/voicemail/search
The voicemail search endpoint queries against voicemail fields and returns back voicemail details in the response.
Required Searchable Fields
Searchable Field | Field type | Description |
owner | String | The ownerType of the voicemail |
owner
is the only field that is required to be in a search criteria.
The owner
corresponds to the ownerType
value of a voicemail. Possible values for owner
include:
ALL
: searches for voicemails with eitherGROUP
orUSER
ownerTypeGROUP
: searches for voicemails withGROUP
ownerTypeUSER
: searches for voicemails withUSER
ownerType
The authenticated API user performing the voicemail search will only be able to search for USER
owned voicemails for which they have permission to view. They will only be able to search for GROUP
owned voicemails in groups in which they are members.
Example: Search for all voicemails owned by a user
{
"pageSize": 25,
"pageNumber": 1,
"query": [
{
"type": "EXACT",
"fields": [
"owner"
],
"value": "USER"
}
]
}
{
"total": 2,
"pageCount": 1,
"pageSize": 25,
"pageNumber": 1,
"types": [
"voicemails"
],
"results": [
{<voicemail detail object>},
{<voicemail detail object>}
]
}
Useful Searchable Fields
Searchable Field | Field type | Description |
ownerId | String | The id of the owner of a voicemail. Will be interpreted as the id of a user or the id of a group depending on which type of owner is being searched against |
deleted | Boolean | Whether the voicemail has been marked as deleted |
read | Boolean | Whether the voicemail has been marked as read |
conversationId | String | The id of a conversation associated with a voicemail |
When searching against USER
ownerTypes, the ownerId
field will search for user ids.
When searching against GROUP
ownerTypes, the ownerId
field will search for group ids.
When searching against ALL
ownerTypes, the ownerId
field will search for both user and group ids.
Example: Search for all unread voicemails owned by a specific group
Note that the user performing the search must be a member of the group in order to search and view voicemaills owned by the group.
{
"pageSize": 25,
"pageNumber": 1,
"query": [
{
"type": "EXACT",
"fields": [
"owner"
],
"value": "GROUP"
},
{
"type": "EXACT",
"fields": [
"ownerId"
],
"value": "b868cb16-3627-45d5-840d-5f16c43922ca"
},
{
"type": "EXACT",
"fields": [
"read"
],
"value": false
}
]
}
{
"total": 1,
"pageCount": 1,
"pageSize": 25,
"pageNumber": 1,
"types": [
"voicemails"
],
"results": [
{<voicemail detail object>}
]
}
Example: Search for undeleted voicemails associated with a specific conversationId, with any type of owner
{
"pageSize": 25,
"pageNumber": 1,
"query": [
{
"type": "EXACT",
"fields": [
"owner"
],
"value": "ALL"
},
{
"type": "EXACT",
"fields": [
"deleted"
],
"value": false
},
{
"type": "EXACT",
"fields": [
"conversationId"
],
"value": "1711037b-4283-4cfe-8ac4-10d7c2ac665f"
}
]
}
{
"total": 2,
"pageCount": 1,
"pageSize": 25,
"pageNumber": 1,
"types": [
"voicemails"
],
"results": [
{<voicemail detail object>},
{<voicemail detail object>}
]
}
Example: Search for voicemails owned by any group from a list of groups, sort by when voicemail was created
{
"pageSize": 25,
"pageNumber": 1,
"sortBy": "createdTime",
"sortOrder":"DESC"
"query": [
{
"type": "EXACT",
"fields": [
"owner"
],
"value": "GROUP"
},
{
"type": "EXACT",
"fields": [
"ownerId"
],
"values": [
"8efed22c-d115-43a6-b0a4-4a30f11cd719",
"8c40e75b-c15b-4822-b5db-ea97a95fe1ab",
"6b427509-30a7-4915-b612-f07960030cae"
]
}
]
}
{
"total": 7,
"pageCount": 1,
"pageSize": 25,
"pageNumber": 1,
"types": [
"voicemails"
],
"results": [
{<voicemail detail object>},
{<voicemail detail object>},
{<voicemail detail object>},
{<voicemail detail object>},
{<voicemail detail object>},
{<voicemail detail object>},
{<voicemail detail object>}
]
}