Create custom field

Creates a custom field on a video (key-value metadata). Max 50 fields per video; keys 1-200 chars, values 1-500 chars; key unique per video. Returns the new field's id only.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /videos/{video_id}?custom_fields

Creates a new custom field for a specific video.

Detailed Description

Creates a new custom field for a video with a unique key-value pair. Each video can have up to 50 custom fields. The key must be unique per video and can contain letters, numbers, underscores, and hyphens. The value is required and cannot be empty.

HTTP Method & Path

POST /videos/{video_id}?custom_fields

Example:
POST /videos/123e4567-e89b-12d3-a456-426614174000?custom_fields

Authentication Requirements

  • Security Scheme: PandaAuth (apiKey)
  • Header: Authorization: <your_api_token> (no Bearer prefix)

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesPanda API token (without Bearer prefix)
video_idpathstring (uuid)YesUnique identifier for the video
custom_fieldsquerystringYesMust be present to create a custom field

Request Body

{
  "key": "category",
  "value": "Educational"
}

Request Body Schema

FieldTypeRequiredDescriptionConstraints
keystringYesCustom field key. Must be unique per video1-200 characters, alphanumeric
valuestringYesCustom field value. Required and cannot be emptyMax 500 characters

Response

Success Response (201)

Returns the created custom field object:

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "video_id": "123e4567-e89b-12d3-a456-426614174000",
  "key": "category",
  "value": "Educational",
  "created_at": "2023-01-15T10:30:00Z",
  "updated_at": "2023-01-15T10:30:00Z"
}

Error Responses

  • 400 Bad Request: Invalid input data or validation errors
  • 401 Unauthorized: Invalid or missing API token
  • 404 Not Found: Video not found
  • 500 Internal Server Error: Server error

Example Usage

curl -X POST \
'https://api-v2-staging.pandavideo.com/videos/123e4567-e89b-12d3-a456-426614174000?custom_fields' \
-H 'Authorization: your_api_token_here' \
-H 'Content-Type: application/json' \
-d '{
"key": "category",
"value": "Educational"
}'
Path Params
uuid
required

Unique identifier for the video

Query Params
string
enum
required

Set to 'true' to create a custom field

Allowed:
Body Params

Request schema for creating a custom field

string
required
length between 1 and 200

Custom field key/name. Must be unique per video.

string
required
length between 1 and 500

Custom field value. Required and cannot be empty.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json