post https://api-v2.pandavideo.com/videos/
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
Name | In | Type | Required | Description |
---|---|---|---|---|
Authorization | header | string | Yes | Panda API token (without Bearer prefix) |
video_id | path | string (uuid) | Yes | Unique identifier for the video |
custom_fields | query | string | Yes | Must be present to create a custom field |
Request Body
{
"key": "category",
"value": "Educational"
}
Request Body Schema
Field | Type | Required | Description | Constraints |
---|---|---|---|---|
key | string | Yes | Custom field key. Must be unique per video | 1-200 characters, alphanumeric |
value | string | Yes | Custom field value. Required and cannot be empty | Max 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"
}'