Show examples in:
    Create a new upload track

    Body Parameters

    url_or_upload_request_id  Required  string  Example: "/7/1455102967-image.png"

    Either an URL to download, or the ID of an upload request

    type  Required  enum  Example: "subtitles"

    The type of track (audio or subtitles)

    language_code  Required  string  Example: "it-IT"

    A valid BCP 47 specification compliant language code

    name  Optional  string  Example: "Italiano"

    The human-readable name of the track

    closed_captions  Optional  null, boolean

    Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)


    Returns a upload_track resource object.


    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const uploadId = 'xBe7u01029ipxBLQhYzZCJ1cke01zCkuUsgnYtH0017nNzbpv2YcsoMDmw';
    const uploadTrack = await client.uploadTracks.create(uploadId, {
    url_or_upload_request_id: '/7/1455102967-image.png',
    type: 'subtitles',
    language_code: 'it-IT'