Skip to content
Last updated

Voice Recording API V3 - Developer Guide

1. Overview

The Voice Recording APIs enable you to fetch voice recording information associated with a case and retrieve the audio stream for a voice recording using its unique identifier.

OperationMethodEndpoint
Fetch Voice RecordingGET/api/v3/voice/recording?caseNumber={caseNumber}
Fetch Voice Recording StreamGET/api/v3/voice/recording/stream?recordingId={recordingId}

2. Base URL and environment

All API calls are sent to:

https://api3.sprinklr.com/{env}/api/v3

So the Voice Recording resources in production are:

https://api3.sprinklr.com/{env}/api/v3/voice/recording
https://api3.sprinklr.com/{env}/api/v3/voice/recording/stream

Replace {env} with your assigned environment identifier (prod0, prod2, prod11, etc.).

3. Authentication and common headers

API headers include the mandatory information sent with the request URL. This information provides the request context and authorisation credentials required to access protected resources.

KeyValueDescription
AuthorizationBearer {token}Credential used by the API to authenticate a user with the server.
Keyapi-keyAPI key used to authenticate the application with the server.
Content-Typeapplication/jsonDetermines the media type associated with the request.
Acceptapplication/jsonDetermines the acceptable response type from the server.

4. API operations

4.1 Fetch a voice recording

GET /api/v3/voice/recording?caseNumber={caseNumber}

Use this API to fetch voice recording information associated with a case.

Query parameters

ParameterRequired/OptionalDescriptionType
caseNumberRequiredUnique case number for which voice recording information is fetched.String

Example request

curl -X GET \
  'https://api3.sprinklr.com/{env}/api/v3/voice/recording?caseNumber={caseNumber}' \
  -H 'Authorization: Bearer {Enter your Access Token}' \
  -H 'Key: {Enter your API KEY}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

Developer note: The response body contains the requested recording stream bytes and can be directly played or downloaded by supported clients.

4.2 Fetch a voice recording stream

GET /api/v3/voice/recording/stream?recordingId={recordingId}

Use this API to fetch the audio stream for a voice recording by its unique identifier.

Query parameters

ParameterRequired/OptionalDescriptionType
recordingIdRequiredUnique identifier of the voice recording stream to fetch.String

Example request

curl -X GET \
  'https://api3.sprinklr.com/{env}/api/v3/voice/recording/stream?recordingId={recordingId}' \
  -H 'Authorization: Bearer {Enter your Access Token}' \
  -H 'Key: {Enter your API KEY}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

Developer note: The response body contains the requested recording stream bytes and can be directly played or downloaded by supported clients.

5. Use cases

The Voice Recording APIs can be used to retrieve voice recordings associated with a case and access the audio stream of a specific recording. The following are common use cases.

5.1 Retrieve voice recordings associated with a case

Use the Fetch Voice Recording API to retrieve voice recording information associated with a specific case.

This is useful when:

  • An application needs to retrieve the voice recordings associated with a customer case.
  • A case contains one or more recorded calls that need to be accessed programmatically.
  • Voice recordings need to be associated with the corresponding case as part of an integration workflow.
  • An application needs to retrieve recordings for subsequent playback or download.

The case is identified using its unique caseNumber.

API: GET /api/v3/voice/recording?caseNumber={caseNumber}

5.2 Retrieve the audio stream for a specific voice recording

Use the Fetch Voice Recording Stream API to retrieve the audio stream for a specific recording using its unique identifier.

This is useful when:

  • A user or application needs to play a specific voice recording.
  • A voice recording needs to be downloaded by a supported client.
  • An integration needs to retrieve recording stream bytes for subsequent processing.
  • A specific recording needs to be accessed independently using its recording identifier.

The recording is identified using its unique recordingId.

API: GET /api/v3/voice/recording/stream?recordingId={recordingId}

5.3 Play a voice recording in a supported client

Use the Fetch Voice Recording Stream API when an application needs to provide playback of a voice recording.

This is useful when:

  • A client application needs to provide playback of a recorded voice interaction.
  • An authorized user needs to listen to a recording associated with an interaction.
  • Recording playback needs to be incorporated into a case or interaction workflow.

The API response contains the requested recording stream bytes, which can be played directly by supported clients.

API: GET /api/v3/voice/recording/stream?recordingId={recordingId}

5.4 Download a voice recording

Use the Fetch Voice Recording Stream API when the audio for a specific recording needs to be downloaded.

This is useful when:

  • A supported client needs to download the audio associated with a voice recording.
  • An integration needs to retrieve recording bytes for downstream processing.
  • A recording needs to be accessed programmatically rather than through a public recording URL.

Recording URLs are non-public, so the recording must be accessed through the API.

API: GET /api/v3/voice/recording/stream?recordingId={recordingId}

5.5 Retrieve recordings as part of a case-based workflow

The Voice Recording APIs can be used together to retrieve recordings associated with a case and subsequently access the audio stream for an individual recording.

A typical workflow can include:

  1. Identify the case using its caseNumber.
  2. Fetch the recordings associated with the case using GET /api/v3/voice/recording?caseNumber={caseNumber}.
  3. Identify the required recording and obtain its recordingId.
  4. Fetch the recording stream using GET /api/v3/voice/recording/stream?recordingId={recordingId}.
  5. Use the returned recording stream bytes for playback or download in a supported client.

6. Migration from V2 to V3

The recording download operation has moved to a new path in V3, and a new case-level operation has been added. Below is a comparison of V2 vs V3 endpoints and behavior:

OperationV2 EndpointV3 EndpointKey Differences
Download a recording by IDGET /api/v2/voice/recording?recordingId={id}GET /api/v3/voice/recording/stream?recordingId={id}The path gains a /stream segment. The parameter name, position and value are unchanged.
Fetch recordings for a caseNot supported in V2GET /api/v3/voice/recording?caseNumber={n}Newly supported in V3. Returns an array, one entry per recorded call on the case.

Important: the path /voice/recording exists in both versions and means something different in each

Version/voice/recording meansKeyed by
V2Download a recordingrecordingId
V3List a case's recordingscaseNumber

A client migrated by changing only v2 to v3 in the base URL will call /api/v3/voice/recording?recordingId={id}. That request is syntactically valid and reaches a real endpoint, but recordingId is not a parameter of the V3 operation and is ignored.

Update the path by hand in every recording download call. There is no safe mechanical rewrite.

What stays the same

AspectBehavior
Hosthttps://api3.sprinklr.com/{env}/...
Authentication headersAuthorization and Key
voice path segmentRetained in V3
recordingId format and meaningUnchanged. Still the message ID of the voice message
Restricted URL modelRecording URLs remain non-public; the API is still the only access route