The GET /interactions/{guid}/content/{contentKey}
endpoint enables you to get a single interaction content file after specifying the interaction GUID and the content key.
Headers
Header parameters in Requests (Interaction Content API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
---|---|
interaction-content:read | Entire endpoint |
Parameters
Path parameters
The endpoint accepts the following path parameters:
guid
Type | Required | Example |
---|---|---|
String | True | 2480fc2c-bbd7-427c-9439-02f76583aef5 |
The unique identifier of the interaction you want to get content for.
contentKey
Type | Required | Example |
---|---|---|
String | True | callRecording |
The identifier of the content you want to get from the interaction. Supported values are:
callRecording
. The call recording files in audio/wav format.transcript
. The transcript of a call recording in application/json format.chatTranscript
. The transcript of a chat in application/json format.attachment
. The attachment file in application/json format.categorizationResult
. The categorization result of the transcript in application/json format.- Unique identifiers. To get a voicemail or a screen recording, you must provide the unique identifier of the specific voicemail or screen recording you want to get. For example,
017f2106-ff1b-8d35-89e5-1e01b327a159
. (Identifiers for older voicemails may be in the formatvoicemail-123
where123
is the ID of the agent who the voicemail is for.) Unique identifiers for voicemails and screen recordings are returned by theGET /interactions
andGET /interactions/{guid}
endpoints.
Header parameters
range
Type | Required | Example |
---|---|---|
String | False | bytes=0-1023 |
This parameter is optional. You can request a specific part of a file from an interaction, for example the first 20MB of a call recording. For information on the standard accepted, see HTTP range requests.
Requests
Request call recording for an interaction
curl -L -X GET "https://***.api.newvoicemedia.com/interaction-content/interactions/017d8f64-945e-4eb4-9bcb-98b7bec78f24/content/callrecording" \ -H "Accept: application/vnd.newvoicemedia.v3+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Request first 1024 bytes of call recording for an interaction
curl -L -X GET "https://***.api.newvoicemedia.com/interaction-content/interactions/017d8f64-945e-4eb4-9bcb-98b7bec78f24/content/callrecording" \ -H "Accept: application/vnd.newvoicemedia.v3+json" \ -H "Range: bytes=0-1023" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Request screen recording for an interaction
curl -L -X GET "https://***.api.newvoicemedia.com/interaction-content/interactions/017d8f64-945e-4eb4-9bcb-98b7bec78f24/content/a94461c0-7d9d-4195-ae5b-0eaffd2bbb59" \ -H "Accept: application/vnd.newvoicemedia.v3+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Request voicemail for an interaction
curl -L -X GET "https://***.api.newvoicemedia.com/interaction-content/interactions/017d8f64-945e-4eb4-9bcb-98b7bec78f24/content/017f2106-ff1b-8d35-89e5-1e01b327a159" \ -H "Accept: application/vnd.newvoicemedia.v3+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Responses
A response to the endpoint returns a file.
Successful response
A response to a valid request contains a binary content file such as an audio, video or json file. The way the file is presented depends on individual client settings. The types of content returned in a response are defined in the Content-Type
header. The GET interaction content
endpoint supports the following types:
callRecording
(audio/wav)transcript
,chatTranscript
,categorizationResult
,attachment
(application/json)screenRecording
(video/webm)voicemail
(audio/wav)
For information about successful responses, see Success response code and parameters in Responses (Interaction Content API).
For information, see Trying out Vonage Contact Center APIs.