Add a folder referrer

Registers an allowed domain on a specific folder.

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

POST /library/{library_id}?action=folder_refer

Registers an allowed domain on a specific folder. Videos in that folder will then accept playback only from the folder's domains.

🚧

action=folder_refer is required

Without the action query parameter the request does not reach this operation.

📘

Authorization

Requires a valid API token in the Authorization header (without Bearer prefix). The library_id and 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

HeaderValue
AuthorizationYour Panda API token (no Bearer prefix)

Path Parameters

NameTypeRequiredDescription
library_idstring (uuid)yesLibrary ID owned by the authenticated user

Query Parameters

NameTypeRequiredDescription
actionstringyesFixed value: folder_refer

Request Body

Content-Type: application/json

Body Parameters

NameTypeRequiredDescription
folder_idstring (uuid)yesFolder that will own the domain
hostnamestringyesDomain to allow. Wildcards accepted (*.mysite.com)
typestringyesALLOW 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: BLOCK has no effect at folder level. The playback check only reads the allow list — a BLOCK domain on a folder is accepted by the API and silently does nothing. Use ALLOW here.
  • 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

StatusWhen
400Domain already exists in this folder, or a required field is missing
404Folder {id} was not found
500Internal 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)
Path Params
uuid
required

Library ID owned by the authenticated user

Body Params
uuid
required
string
required
string
enum
required
Allowed:
Responses

400

Domain already exists in this folder

404

Folder was not found

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