Toggle a single referrer status (activate / deactivate)

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.

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

PATCH /library/{library_id}?action=refer_status

Activates 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_status is required

The action query parameter selects this operation. Without it the request does not reach this handler.

📘

Authorization

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

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: refer_status

Request Body

Content-Type: application/json

Body Parameters

NameTypeRequiredDescription
refer_idstring (uuid)yesReferrer to toggle
activebooleanyestrue activates, false deactivates
{
  "refer_id": "45b24bd7-a065-4718-86b2-30cb6eda3245",
  "active": false
}
⚠️

The field is active, not status

The body accepts only these two fields. Any extra key — including status — is rejected with 400. Note that the response does return a status field; 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

FieldTypeDescription
idstring (uuid)Referrer ID
urlstringHostname
typestringALLOW or BLOCK
statusstringLifecycle state after the call — see the transitions below
library_idstring (uuid)Library the referrer belongs to

Transitions

You sendImmediate statusFinal status (after the worker)
active: truependingactive
active: falseturning_inactiveinactive

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 200 with the referrer unchanged — no new sync is queued.
  • A referrer already in an intermediate state (pending, deleting, turning_inactive) cannot be toggled and returns 400.
  • This endpoint does not change block_none_refer. To turn the library-wide policy on or off use POST /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

StatusWhen
400Body carries a field other than refer_id / active, active is not a boolean, or the referrer is in an intermediate state
404refer_id does not exist, or does not belong to the authenticated user
500Internal 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
Path Params
uuid
required

Unique identifier of the library

Query Params
string
enum
required

Must be refer_status

Allowed:
Body Params
uuid
required

ID of the referrer to activate or deactivate

boolean
required

true to activate (→ pending), false to deactivate (→ turning_inactive)

Responses

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