Calls
Call related data for all calls made or received on the Spoke platform by your organisation. Query these endpoints to retrieve comprehensive call data records that can then be imported into a BI tool or stored as call activities in your CRM system.
List calls
Lists your calls. You can restrict the result set using any of the following parameters:
since(unix timestamp): Only return calls that started on or after the given timestamp.before(unix timestamp): Only return calls that started on or before the given timestamp.modified(unix timestamp): Only return calls that have been modified since the given timestamp. We recommend you use this parameter if you are regularly polling the API to retrieve the latest calls. The modified timestamp will be updated if a user stores additional notes against a call after the call has ended.includeActive: Return all calls, active and ended. By default, this is false and only ended calls are returned.
These parameters may be used in combination (i.e. get all calls between since and before that have been updated after modified).
This endpoint supports paging. By default the API will return 100 calls, configurable up to a maximum of 1000 calls at a time. If the result from a previous call includes a next value in the result set you can use the value returned as tne next parameter in the query string to retrieve the next page of results.
query Parameters
nextOptional next token for object pagination
limitThe number of objects fetched per request. Default to 100, maximum is 1000
sinceGet all matching created since (UNIX timestamp)
beforeGet all matching records created before (UNIX timestamp)
modifiedGet all records modified since (UNIX timestamp)
includeActiveSet this value as true to get all calls, active and ended. Set it as false to get only ended calls. Defaults to false.
includeRecordingUrlSet this value as true to get recording URLs for call recordings, voicemail and highlights. Set it as false to omit the URLs. Defaults to true.
sortOrderThe order of results returned when listing calls.
One of the following values:
- ascending: Sort results in ascending order (oldest first). By default, the results will be sorted using the
lastModifiedTimestampfield. If thesinceorbeforeparameter is specified, the results will be sorted using thestartedTimestampfield. - descending: Sort results in descending order (latest first). By default, the results will be sorted using the
lastModifiedTimestampfield. If thesinceorbeforeparameter is specified, the results will be sorted using thestartedTimestampfield.
By default, the results will be sorted in ascending order using the lastModifiedTimestamp field.
contactNumberOnly return calls where the contactNumber field matches the parameter value. The parameter value must be provided in +E164 format.
Use this parameter to find calls for a given external party such as a customer.
Headers
AuthorizationAuthorization header bearing the access token
List calls › Responses
Calls
Get a call
Get a call resource by ID.
path Parameters
idThe call ID
query Parameters
includeRecordingUrlSet this value as true to get recording URLs for call recordings, voicemail and highlights. Set it as false to omit the URLs. Defaults to true.
Headers
AuthorizationAuthorization header bearing the access token
Get a call › Responses
Call
directionCall direction. One of the following values:
- inbound: An incoming call to Spoke Phone from an external caller
- outbound: An outgoing call from Spoke Phone to another caller
idThe id of the call
initiator** DEPRECATED **. Use the contactNumber and companyNumber fields instead.
isConferenceIndicates whether the call was a Spoke conference call.
Webhook events call.answered, call.not_answered, call.hungup will not fire for calls where this field
is set to true
isInternalIndicates whether the call was an internal (Spoke User to Spoke User) call. If this flag is true then there was no external party on the call, and the contactNumber and companyNumber fields will be empty.
This field is provided to simplify integration with CRM platforms. As there is no 'customer' or external party involved in the call these calls can be excluded from CRM call logs.
Webhook events call.answered, call.not_answered, call.hungup will not fire for calls where this field
is set to true
lastModifiedAtDate/Time (UTC - ISO8601 format) that this call was last modified.
lastModifiedTimestampUnix timestamp that this call record was last modified.
recipient** DEPRECATED **. Use the contactNumber and companyNumber fields instead.
startedAtDate/Time (UTC - ISO8601 format) that this call started.
startedTimestampUnix timestamp that this call was started
statusStatus of the call. One of the following values:
startedofferedmissedacceptedendedabandonedblocked
Human readable call summary suitable for inserting into call note fields in CRM platforms.
Currently these are provided in English language only.
answeredAtDate/Time (UTC - ISO8601 format) that this call started
The team assigned to the call. This is a calculated value and is determined as the last team that is offered the call.
This field will be null for calls that are sent directly to users or phone numbers.
The phonebook contact (if any) associated with the external party on the call.
The user assigned to the call. This is a calculated value and is determined as the last user on the call
companyNumberThe company number that originated or terminated this call. This will be one of the numbers defined in the Spoke Phone Number settings page.
This field will be null for Spoke internal calls (where isInternal is true).
contactNumberThe phone number of the external party that originated or terminated this call. Use this field
for CRM integration if there is no value in the assignedContact field and you wish to create
a new record for unknown customer numbers.
Possible values:
- null: This field will be blank for Spoke internal calls (where
isInternalis true). - ANONYMOUS: If the external party has masked their caller id then this field will contain the value
ANONYMOUS - +E164 Number: A phone number in +E164 format (e.g. +16508221060)
For inbound calls, contains the directory entry the call was originally routed to/intended for.
For outbound calls, this field will be empty.
In the case of calls to teams where roll-over rules have applied, this field will contain the first "offered" team only.
durationDuration of the call in milliseconds.
durationTextDuration of the call in human readable form
endedAtDate/Time (UTC - ISO8601 format) that this call ended or the caller hung up
A list of forms started or submitted for this call.
A Form represents a form started or submitted by a Spoke user, during the call, at the end of the call,
or at any time after the call has ended.
A list of highlights for this call.
A Highlight represents a snapshot of the call, taken at a point in time by a Spoke user, with one or more optional tags selected.
It is possible to have multiple Highlights in a call, and each Highlight may have multiple tags associated with it.
A list of notes recorded against a call.
A Note represents a note recorded by a Spoke user at the end of the call, or at any time after the call has ended
The note is first transcribed and then optionally edited by the user.
It is possible to store multiple Notes against a call, and each Note can have multiple NoteContent
items for each paragraph of text recorded.
The final outcome of the call. Populated for all calls, once the call has ended.
For inbound calls that are unanswered (i.e. missed or abandoned) this field contains
further details about the reason for the outcome.
For outbound calls that are blocked this field contains
further details about the reason for the outcome.
A list of the parties on this call. Each call will consist of at least one, and possibly many, call parties.
A call party represents a User, Device or in the case of external parties, an E164 PSTN phone number.
It is possible for a party to leave and then rejoin a call via transfer or conference. Each instance of
the party joining the call is represented by a separate entry in the connections attribute of the
call party.
Passthrough parameters associated with the call. Use passthrough parameters to initiate and trace calls from other systems.
Passthrough parameters can be associated with a call via the following mechanisms.
- Deep linking - dialing a call via the Spoke App
- Redirect - redirecting a call to Spoke from Twilio
- Data Action - returning passthrough parameters in response to a call related data action request.
The parameter names and values are URL decoded, safety checked and stored on input and no additional processing is performed.
All recordings associated with this call.
It is possible for a call to have more than one recording if the organisation has the ad-hoc recording option enabled. This option allows users to toggle recording on and off during the call. In this case there will be one recording per "on" period.
The overall call tariff calculated by Spoke's call tariffing engine.
Note: This field is only populated when the optional "Call Tariffing API" add-on is enabled.
For BYOT Customers:
- Tariffing does not meter calls that are not carried by Spoke. For example, Flex-only or Studio-only calls will not be metered.
- Due to the asynchronous nature of the Twilio platform, call durations are likely to differ on Spoke vs Twilio.
- Incoming calls that are initially handled through Studio before being redirected to Spoke will have their start time as the time the Spoke Redirect Handler was called. In these cases, the total time for an inbound call tariffed on Spoke will not include the time the caller was interacting with Studio.
All calls are tariffed in real time. This field will be populated once the call has ended.
Tariffing does not meter other services such as call recording.
Tariffs are calculated based on the following factors:
-
The number of connected call parties. An
answeredcall has a minimum of two call party connections. -
Each party is tariffed based on a call route. There are a number of factors which determine a call route, including the mode of transport (e.g. Spoke Client, SIP or PSTN), and, in the case of PSTN calls, the initiator and recipient numbers
-
If a a user leaves and then rejoins a call via transfer or conference, each instance will be treated as a separate party for the purpose of tariffing. Each party connection is identifiable by vendorCallId for reconciliation against external systems
-
Call duration. By default, the Spoke tariffing engine tariffs calls rounded up to the nearest minute. This means that a connection which is 10 seconds long will be billed with a quantity of 1, similarly a connection which is 75 seconds long will be billed with a quantity of 2
-
The total call cost is calculated as the sum of the individual connected party tariffs.
The first user on the call. This is the user who either initiated the call (for outbound calls) or answered the call (for inbound calls).
vendorThe CPaaS vendor that carried the call. One of the following values:
twilio
vendorCallIdThe vendor's identifier for the call. The value of this field is dependent
on the value of the vendor field:
twilio: theCallSidof the parent call
Voicemail associated with this call.
If a call with direction of inbound has a status of missed then there may be a voicemail recording. This provides details about the voicemail and optionally
waitTimeThe length of time in milliseconds the first caller waited prior to the call being answered by a user or an external party.
If the call was answered, this field is calculated as the time difference between startedAt and answeredAt,
where startedAt is the time that the call started on the Spoke platform.
For inbound calls, if the customer has interacted with the Spoke IVR, then wait time will include the IVR interaction time.
For unanswered calls this field is equivalent to the duration of the call.
waitTimeTextWait time of the call in human readable form
Get a call recording
Get a call recording recource by ID
path Parameters
idThe call ID
recordingIdThe call recording ID
Headers
AuthorizationAuthorization header bearing the access token
Get a call recording › Responses
Call Recording
callIdThe ID of the call this recording belongs to
channelsThe number of channels in the recording. One of:
1: mono2: stereo
durationDuration of the call recording in seconds
fileSizeThe size of the call recording file in bytes
idThe ID of the call recording
mimeTypeThe MIME type of the recording. One of:
audio/mpegaudio/wav
startedAtDate/Time (UTC - ISO8601 format) when the call recording started
The transcript of the call recording
urlURL of the recording for retrieval.
The URL is a signed URL that expires six hours after the call was recorded. To get a newly signed URL, GET the call resource from the /calls/:id API
endpoint.
If the query parameter includeRecordingUrl is set to false, this will be omitted.
Delete a call recording
Delete the specified call recording of a call
path Parameters
idThe call ID
recordingIdThe call recording ID
Headers
AuthorizationAuthorization header bearing the access token
Delete a call recording › Responses
Successfully deleted the call recording
List a call's content analysis data
Lists your content analysis data for a specific Spoke call ID. Only content analysis data with status succeeded are included.
You can restrict the result set using the artifact parameter to only return content analysis data that contain a specific artifact schema name.
This endpoint supports paging. By default the API will return content analysis items, configurable up to a maximum. If the result from a previous call includes a next value in the result set you can use the value returned as the next parameter in the query string to retrieve the next page of results.
path Parameters
idThe call ID
query Parameters
Headers
AuthorizationAuthorization header bearing the access token
List a call's content analysis data › Responses
List of content analysis data
The content analyses matching the filters provided as query params