v1

latestOpenAPI 3.1.02026-07-24251250397.8 KB
image

Create an additional image for media

Before you can upload a new image, you need to create a new image first. This endpoint allows you to create a new image resource. In the response, you'll receive upload_link or upload_id and upload_token depending on the upload.method provided. NOTE: If the site already has 40 unique labels, a request to create an image with a new label will be rejected.

post/v2/sites/{site_id}/media/{media_id}/images/

Path parameters

site_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the site

media_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the media

Request body

Example request

{
  "metadata": {
    "label": "roku-portrait"
  },
  "upload": {
    "method": "direct"
  }
}

Response

Request to add image successful

schemastring
idstring

Unique identifier for a resource

createdstring

Date and time at which the resource was created

last_modifiedstring

Date and time at which the resource was most recently modified

typestring

Name of the type of resource.

relationshipsobject

Ancilliary resources associated to the primary resource being read

upload_linkstring

URL to be used for uploads This is returned only when upload.method is direct.

Example response

{
  "schema": "https://schema.jwplayer.com/types/thumbnail.json",
  "id": "Ny05CEfj",
  "created": "2019-09-25T15:29:11.042095+00:00",
  "last_modified": "2019-09-25T15:29:11.042095+00:00",
  "metadata": {
    "label": "roku-portrait"
  },
  "image_data": {
    "width": 1920,
    "height": 1080,
    "mime_type": "image/jpeg"
  }
}