1. Home
  2. API's
  3. Video On Demand API

Video On Demand API

Video on demand API allow you to create videos using the Treepodia engine without the need for data-feed

Authentication

Every API request must be authorized by attaching an access token to it. The following service provides access token generation

Auth request usage example

Request URL: http://api.treepodia.com/rest/vod/v032021/auth
Method: POST
Content Type: application/json
Body:
{
   "email":"test@email.com",
   "password":"123456",
   "expirationDate": 1646794257759
}

expirationDate – optional parameter, if it is not specified, the expiration will be in 2 weeks. The use of this parameter depends on the required level of security.

Successful response body

{
   "status": "SUCCESS",
   "accessToken": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
   "expirationDate": 1646794257759
}

VOD Request

Every API request must be authorized by attaching an access token to it. The following service provides access token generation

  • Send a POST request to https://api.treepodia.com/rest/vod/v032021/acc/{uuid}/requests
    REPLACE {UUID} IN THE URL WITH YOUR ACTUAL TREEPODIA UUID
  • Use “application/json” as content type for your request
  • The body of the request MUST have the following fields:
    1. accessToken – STRING
    2. sku – STRING
    3. templateId = INT
    4. requestData – OBJECT
      This object holds the data the template needs to create the video
      • templatefield1
      • templatefield2
      • templatefield3
    5. callback – OBJECT
      This object holds the content for the callback when the video is ready
      • url – STRING
      • method – STRING (“POST”)
      • contentType – STRING (“application/json”)
      • headers – ARRAY OF OBJECTS (optional)
        Custom HTTP headers to be sent with the callback request.
        • name – STRING
          Header name (e.g. "Authorization").
        • value – STRING
          Header value (e.g. "Bearer <token>").
      • body – STRING (“{\”requestId\”:\”{requestId}\”,\”videoUrl\”:\”{videoUrl}\”,\”status\”:\”{status}\”,\”errorMessage\”:\”{errorMessage}\”}”)

Auth request usage example. Where <<UUID>> should be replaced with your UUID

Request URL: http://api.treepodia.com/rest/vod/v032021/acc/<<UUID>>/requests
Method: POST
Content Type: application/json
Body:
{
  "accessToken": "aefc18c8-7bb0-41e2-a855-xxxxxxxxxxxxxx",
  "sku": "test25",
  "templateId": 0,
  "requestData": {
    "firstName": "Test",
    "lastName": "Last"
  },
  "callback": {
    "url": "https://yourdomain.com/vodcallback",
    "method": "POST",
    "contentType": "application/json",
    "headers": [
      {
        "name": "Authorization",
        "value": "Bearer YOUR_BEARER_TOKEN"
      },
      {
        "name": "X-Custom-Header",
        "value": "custom-value"
      }
    ],
    "body": "{\"requestId\":\"{requestId}\",\"videoUrl\":\"{videoUrl}\",\"status\":\"{status}\",\"errorMessage\":\"{errorMessage}\"}"
  }
}

Successful response body

{ "id": 2, "status": "PENDING" }
Updated on December 22, 2025

Was this article helpful?

Related Articles