Page Contents

    Managing Transcripts Using the CMS API

    In this topic, you will learn how to use the CMS API to update transcripts of your videos.

    Introduction

    You can use a PATCH request to update the metadata associated with the transcripts.

    Notes

    • The methods explained in this document are for updating transcript files added to your videos. Currently you can have Brightcove generate a transcript file (along with captions) during ingestion. Ingesting your own transcript files will be supported in a future release.

    Authorization

    Requests to the CMS API require an authorization header which contains your access tokens. For details on how to obtain client credentials and use them to retrieve access tokens, see the Brightcove OAuth Overview.

    The operations you will need to update video metadata are video-cloud/video/update or video-cloud/video/all.

    Syntax

    We recommend making the following request first to get the complete array:

    
    GET
    https://cms.api.brightcove.com/v1/accounts/{account_id}/videos/{video_ID}
    
    

    Updating Transcripts

    When updating Transcripts, some fields in Transcripts Fields can be treated differently according to its type.

    Text Track Fields
    Field Type Description
    id String READ-ONLY value. System-generated id required to identify the TT that needs to be updated.
    account_id String READ-ONLY value. Updates on this field will be ignored.
    src String READ-ONLY. Location of the transcript file.
    srclang String 2 or 4 letter language code, such as es or es-MX
    label String Human-readable label. Limited to 255 characters.
    status enum Valid values (case-sensitive):
    • published - transcripts will be available to viewers
    • draft - transcripts will not be available to viewers
    sources Array READ-ONLY value. http and https URLs for the transcript.
    default Boolean true or false. You cannot add multiple default=true to transcripts with different srclang.

    Updates on this field will be ignored.

    Request

    PATCH https://cms.api.brightcove.com/v1/accounts/{account_id}/videos/{video_ID} 

    Request body example

    The request body will be a JSON object containing an array of transcripts:

    "transcripts": [
      {
          "id": "d5967d03-1de1-a2de-47db-73486c7474c1",
          "account_id": "12345678910",
          "src": "http://bcboltqause1-a.akamaihd.net/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/d5967d03-1de1-47db-a2de-774c3486c741/transcript.txt?akamai_token=exp=1656544942~acl=/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/d5967d03-1de1-47db-a2de-774c3486c741/transcript.txt*~hmac=101a93fa0e0d247194de3c128460d457d4eea7a27d270a1f8509c2c00205af10",
          "srclang": "en-IE",
          "label": "Irish English",
          "status": "draft",
          "sources": [
              "http://bcboltqause1-a.akamaihd.net/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/d5967d03-1de1-47db-a2de-774c3486c741/transcript.txt?akamai_token=exp=1656544942~acl=/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/d5967d03-1de1-47db-a2de-774c3486c741/transcript.txt*~hmac=101a93fa0e0d247194de3c128460d457d4eea7a27d270a1f8509c2c00205af10",
              "https://bcboltqause1-a.akamaihd.net/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/d5967d03-1de1-47db-a2de-774c3486c741/transcript.txt?akamai_token=exp=1656544942~acl=/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/d5967d03-1de1-47db-a2de-774c3486c741/transcript.txt*~hmac=101a93fa0e0d247194de3c128460d457d4eea7a27d270a1f8509c2c00205af10"
          ],
          "default": false
      },
      {
          "id": "2d0cb632-8753-a68a-4143-aea0429eac7f",
          "account_id": "12345678910",
          "src": "http://bcboltqause1-a.akamaihd.net/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/2d0cb632-a68a-4143-8753-aea0429eac7f/transcript.txt?akamai_token=exp=1656544942~acl=/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/2d0cb632-a68a-4143-8753-aea0429eac7f/transcript.txt*~hmac=8ae7069ac9717559e9439f5112ee133d955ec18a09563e7a3e2a48a83637c108",
          "srclang": "en-US",
          "label": "American English",
          "status": "draft",
          "sources": [
              "http://bcboltqause1-a.akamaihd.net/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/2d0cb632-a68a-4143-8753-aea0429eac7f/transcript.txt?akamai_token=exp=1656544942~acl=/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/2d0cb632-a68a-4143-8753-aea0429eac7f/transcript.txt*~hmac=8ae7069ac9717559e9439f5112ee133d955ec18a09563e7a3e2a48a83637c108",
              "https://bcboltqause1-a.akamaihd.net/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/2d0cb632-a68a-4143-8753-aea0429eac7f/transcript.txt?akamai_token=exp=1656544942~acl=/media/v1/text/txt/clear/12345678910/c6359761-86f7-70d6-4b98-f11f5bb98475/2d0cb632-a68a-4143-8753-aea0429eac7f/transcript.txt*~hmac=8ae7069ac9717559e9439f5112ee133d955ec18a09563e7a3e2a48a83637c108"
          ],
          "default": false
      }
    ]

    Page last updated on 24 Oct 2022