API Reference

Update custom field

Updates an existing custom field by its ID. Both key and value can be updated. Key max 200 characters, value max 500 characters. Value is required and cannot be empty.

PUT /videos/{video_id}?custom_fields&id={custom_field_id}

Updates an existing custom field for a specific video by its ID.

Detailed Description

Updates an existing custom field for a specific video. The custom field is identified by its unique ID. You can update either the key, the value, or both. The key is optional but if provided, must be unique per video and has a maximum length of 200 characters. The value is required, cannot be empty, and has a maximum length of 500 characters.

HTTP Method & Path

PUT /videos/{video_id}?custom_fields&id={custom_field_id}

Example:
PUT /videos/123e4567-e89b-12d3-a456-426614174000?custom_fields&id=987fcdeb-51a2-4e59-a125-23379b3692b5

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 update a custom field
idquerystring (uuid)YesUnique identifier for the custom field to update

Request Body

{
  "key": "updated_category",
  "value": "Updated Educational Content"
}

Request Body Schema

FieldTypeRequiredDescriptionConstraints
keystringNoNew key for the custom field. Optional - if provided, must be unique per video.1-200 characters, alphanumeric
valuestringYesNew value for the custom field. Required and cannot be empty.Max 500 characters

Response

Success Response (200)

Returns the updated custom field object:

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "video_id": "d848feb5-b5a2-4e59-a125-23379b3692b5",
  "key": "updated_category",
  "value": "Updated Educational Content",
  "created_at": "2023-01-15T10:30:00Z",
  "updated_at": "2023-01-15T11:45:00Z"
}

Error Responses

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

Example Usage

curl -X PUT \
'https://api-v2-staging.pandavideo.com/videos/123e4567-e89b-12d3-a456-426614174000?custom_fields&id=987fcdeb-51a2-4e59-a125-23379b3692b5' \
-H 'Authorization: your_api_token_here' \
-H 'Content-Type: application/json' \
-d '{
"key": "updated_category",
"value": "Updated Educational Content"
}'
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!