API Reference

Create custom field

Creates a new custom field for a video. Maximum 50 custom fields per video.

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"
}'
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!