post
https://api-v2.pandavideo.com.br/library/?action=folder_refer
Registers an allowed domain on a specific folder.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
POST /library/{library_id}?action=folder_refer
{library_id}?action=folder_referRegisters an allowed domain on a specific folder. Videos in that folder will then accept playback only from the folder's domains.
action=folder_referis requiredWithout the
actionquery parameter the request does not reach this operation.
AuthorizationRequires a valid API token in the
Authorizationheader (withoutBearerprefix). Thelibrary_idand the folder must belong to the authenticated user.
HTTP Method & Path
POST /library/{library_id}?action=folder_refer
Base URL: https://api-v2.pandavideo.com.br
Authentication Requirements
| Header | Value |
|---|---|
Authorization | Your Panda API token (no Bearer prefix) |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
library_id | string (uuid) | yes | Library ID owned by the authenticated user |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | string | yes | Fixed value: folder_refer |
Request Body
Content-Type: application/json
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
folder_id | string (uuid) | yes | Folder that will own the domain |
hostname | string | yes | Domain to allow. Wildcards accepted (*.mysite.com) |
type | string | yes | ALLOW or BLOCK |
{
"folder_id": "123e4567-e89b-12d3-a456-426614174000",
"hostname": "course.mysite.com",
"type": "ALLOW"
}Response
Success Response (200)
{
"refer": {
"id": "789e4567-e89b-12d3-a456-426614174999",
"url": "course.mysite.com",
"type": "ALLOW",
"status": "pending",
"origin": { "type": "folder", "id": "123e4567-e89b-12d3-a456-426614174000" }
}
}The domain is created as pending; a worker syncs it with the CDN and moves it to active.
Important
type: BLOCKhas no effect at folder level. The playback check only reads the allow list — aBLOCKdomain on a folder is accepted by the API and silently does nothing. UseALLOWhere.- Folder domains replace the library-level list for videos in that folder.
- The same domain may be registered on different folders; the same domain twice on the same folder is rejected.
- Changes take up to ~6 minutes to affect playback (settings are cached).
Error Responses
| Status | When |
|---|---|
400 | Domain already exists in this folder, or a required field is missing |
404 | Folder {id} was not found |
500 | Internal error |
Example Usage
cURL
curl -X POST \
"https://api-v2.pandavideo.com.br/library/{library_id}?action=folder_refer" \
-H "Authorization: $PANDA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"folder_id": "{folder_id}",
"hostname": "course.mysite.com",
"type": "ALLOW"
}'Related
- List folder domains:
GET /library/{library_id}?action=folder_refer - Remove a folder domain:
DELETE /library/{library_id}?action=folder_refer - Edit in bulk: Edit allowed domains (bulk)
400Domain already exists in this folder
404Folder was not found
