api.clarify.io
  1. bundles
api.clarify.io
  • bundles
    • List bundles
      GET
    • Create a bundle
      POST
    • Delete a bundle
      DELETE
    • Get a bundle
      GET
    • Update a bundle
      PUT
    • Get bundle insights
      GET
    • Request an insight to be run
      POST
    • Get bundle insight
      GET
    • Delete bundle metadata
      DELETE
    • Get bundle metadata
      GET
    • Update bundle metadata
      PUT
    • Delete bundle tracks
      DELETE
    • Get bundle tracks
      GET
    • Add a track for a bundle
      POST
    • Update a tracks for a bundle
      PUT
    • Delete a bundle track
      DELETE
    • Get bundle track
      GET
    • Add media to a track
      PUT
  • reports
    • Generate Group Report <span class="label">beta</span>
      GET
    • Generate Trends Report <span class="label">beta</span>
      GET
  • search
    • Search bundles
      GET
  1. bundles

Add a track for a bundle

POST
/v1/bundles/{bundle_id}/tracks
Add a new track to a bundle. This will insert or append a new track in the tracks array or return an error if the maximum number of tracks (12) has been reached or the track number specifies an invalid index.

Once all media parts have been added to a track it is immutable, meaning it cannot be modified. If you wish to modify a track, simply add a new one and delete the existing one.

label is a short name for the track.

media_url must be a publicly accessible url to a media file. It will be fetched asynchronously after the REST call returns. The audio can be mono or stereo.

audio_channel is used to specify audio channels if the media is a stereo file. A value of left or right signifies that only the specified channel will be used. If no value or an empty string is specified for audio_channel, all channels will be used in a single track. If your stereo channels were recorded separately with each channel containing distinct content (for example if 2 legs of a phone call were recorded separately and combined into a single stereo file), for best speech recognition, create two tracks with audio_channel to be left and right. If your stereo file is simply a recording made with a stereo microphone, audio_channel should be set to an empty string (or not be specified.)

audio_language can be used to specify the language of the audio media. This is an optional parameter and if not specified or an empty string, the language of the track will be automatically detected. If specified, it must be a language code as described in RFC5646 (see http://tools.ietf.org/html/rfc5646). Supported languages: en-US, en-UK, es, fr.

start_time a time in seconds that the media starts, relative to start time of the bundle. This allows you to specify sequential parts of media. If not specified, the default is 0.

parts_pending a boolean flag specifying if more media parts will subsequently be added to the track. If true, a subsequent API call must be made to signify that the track is complete. If not specified, the default is false.

track is the index in the tracks array where the new track will be added. Track numbers start at 0. If this parameter is not specified the new track will always be appended to the end of the array. If the track specified is greater than the last index of the array + 1, an error will be returned.

If version specified, the track will only be added if the current version matches this parameter value. If the version doesn't match, a 409 Conflict error will be returned. If version not specified, the track will always be updated.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.clarify.io//v1/bundles//tracks' \
--data-urlencode 'media_url='
Response Response Example
200 - Example 1
{}

Request

Path Params
bundle_id
string 
required
id of a bundle
Body Params application/x-www-form-urlencoded
label
string 
optional
Label for the track. Up to 128 characters.
media_url
string 
required
URL of a media file for this bundle. Up to 2083 characters.
audio_channel
string 
optional
The audio channel to use for the track ( "" | left | right ). Default is empty string which means all channels of audio in the media file are used for the track.
audio_language
string 
optional
Language of the audio in the track, specified with an RFC5646 code.
start_time
string 
optional
Time offset in seconds that the media starts relative to the bundle. Default is 0.
parts_pending
string 
optional
Set to true if more media parts will be added to the track. Default is false.
track
string 
optional
Track number specifies the index of the new track in the tracks array. An integer from 0 to 11. If not specified, the new track is appended to the array.
version
string 
optional
Object version.

Responses

🟢200No response was specified
application/json
Body
object {0}
🟢201Created
🟠400Bad request
🟠404Not found
🟠409Conflict
Modified at 2022-09-10 16:56:00
Previous
Get bundle tracks
Next
Update a tracks for a bundle
Built with