Activates or deactivates a single referrer by refer_id, selected by ?action=refer_status. This toggles one referrer without changing the global block_none_refer policy.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
PATCH /library/{library_id}?action=refer_status
{library_id}?action=refer_statusActivates or deactivates a single referrer by refer_id. This toggles one domain without deleting it and without touching the library-wide block_none_refer policy.
action=refer_statusis requiredThe
actionquery parameter selects this operation. Without it the request does not reach this handler.
AuthorizationRequires a valid API token in the
Authorizationheader (withoutBearerprefix). Thelibrary_idand the referrer must belong to the authenticated user.
HTTP Method & Path
PATCH /library/{library_id}?action=refer_status
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: refer_status |
Request Body
Content-Type: application/json
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
refer_id | string (uuid) | yes | Referrer to toggle |
active | boolean | yes | true activates, false deactivates |
{
"refer_id": "45b24bd7-a065-4718-86b2-30cb6eda3245",
"active": false
}
The field isactive, notstatusThe body accepts only these two fields. Any extra key — including
status— is rejected with400. Note that the response does return astatusfield; that is the referrer's lifecycle state, not the flag you send.
Response
Success Response (200)
{
"id": "45b24bd7-a065-4718-86b2-30cb6eda3245",
"url": "www.teste222.com",
"type": "ALLOW",
"status": "inactive",
"library_id": "09e4c4ad-d0f4-4186-aaeb-4db41b75bcf8"
}Response Schema
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Referrer ID |
url | string | Hostname |
type | string | ALLOW or BLOCK |
status | string | Lifecycle state after the call — see the transitions below |
library_id | string (uuid) | Library the referrer belongs to |
Transitions
| You send | Immediate status | Final status (after the worker) |
|---|---|---|
active: true | pending | active |
active: false | turning_inactive | inactive |
The intermediate states resolve in seconds to a couple of minutes, once the refer worker has synchronised the change with the CDN.
Important
- The operation is idempotent: sending the state a referrer already has returns
200with the referrer unchanged — no new sync is queued.- A referrer already in an intermediate state (
pending,deleting,turning_inactive) cannot be toggled and returns400.- This endpoint does not change
block_none_refer. To turn the library-wide policy on or off usePOST /library/{library_id}?action=referValidation.- Works for both library-level referrers (
folder_id = null) and folder-level ones; the change is queued for edge synchronisation either way.- Changes are cached — allow a few minutes before playback reflects the new state.
Error Responses
| Status | When |
|---|---|
400 | Body carries a field other than refer_id / active, active is not a boolean, or the referrer is in an intermediate state |
404 | refer_id does not exist, or does not belong to the authenticated user |
500 | Internal error |
Example Usage
cURL — deactivate a domain (keeps it registered)
curl -X PATCH \
"https://api-v2.pandavideo.com.br/library/{library_id}?action=refer_status" \
-H "Authorization: $PANDA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "refer_id": "{refer_id}", "active": false }'cURL — activate it again
curl -X PATCH \
"https://api-v2.pandavideo.com.br/library/{library_id}?action=refer_status" \
-H "Authorization: $PANDA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "refer_id": "{refer_id}", "active": true }'Related
- List referrers:
GET /library/{library_id}?action=refer - Consolidated view:
GET /library/{library_id}?action=refer_all - Turn the library-wide policy on/off:
POST /library/{library_id}?action=referValidation - Remove a referrer:
DELETE /library/{library_id}?action=refer
