Create a new bundle with the specified name, media url, and optional JSON metadata.
name can be any string you wish to associate with the bundle.
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 set to left and right in each track respectively. 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.) If you have audio channels as separate media files, after creating the bundle with one media_url, POST another media_url to /bundles/{bundle_id}/tracks.
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.
label is a short name for the track.
metadata is a single-level JSON object of your own definition, containing key-values that can be searched and filtered on. Metadata can be used to hold text such as names, titles, descriptions and values for segregating bundles, for example by user, topic, folder name etc. The keys (property names) can be up to 64 characters and must contain only alphanumeric characters and underscore (but not start with underscore) and must not be a reserved name. Reserved names are "true", "false", and "null". Values can be strings, numbers, boolean true/false, date-times represented as a string in ISO 8601 format (ex. "2014-02-25T14:23:45.000Z"), or an array of these primitive types. Strings can be up to 2000 characters and strings in arrays can be up to 128 characters each. Nested objects are not allowed. Metadata can contain up to 50 key-value pairs up to a total JSON size of 4000 characters.
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.
external_id is an optional parameter that can be used to logically link a bundle to an item in an external system. The external_id can be whatever you use to identify items in your own database.
notify_url is a webhook. It must be a publicly accessible url (http or https) on your server to which notifications for the bundle will be POSTed. There are three types of notifications: Track Notifications, Insight Notifications and Bundle Notifications. For more information on the content of notifications and when they are sent, see the notification docs page.
If a track was created along with the budle, the link relation clarify:track will be included with a link to the new track.
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.clarify.io//v1/bundles'
Response Response Example
200 - Example 1
{}
Request
Body Params application/x-www-form-urlencoded
name
string
optional
Name of the bundle. Up to 128 characters.
media_url
string
optional
URL of a media (audio or video) 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.
label
string
optional
Label for the track (if media_url is specified.) Up to 128 characters.
metadata
string
optional
User-defined JSON data associated with the bundle. Must be valid JSON, up to 4000 characters.
notify_url
string
optional
URL for notifications on this bundle. Up to 2083 characters.
external_id
string
optional
A string that can refer to an item in an external system. Up to 128 characters.