put
https://api-v2.pandavideo.com.br/library//hls-encryption
Enables or disables HLS encryption for new uploads in this library.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
PUT /library/{library_id}/hls-encryption
{library_id}/hls-encryptionEnables or disables HLS encryption for new uploads in this library.
Enabling encryption does not change existing videosIt applies to new uploads. To protect videos that already exist, reprocess them — see Reprocess a video for a single video, or Reprocess videos in bulk for up to 100 at a time. Reprocessing requires the library to have
keep_original_filesenabled and consumes credits.
AuthorizationRequires a valid API token in the
Authorizationheader (withoutBearerprefix). Thelibrary_idmust belong to the authenticated user.
HTTP Method & Path
PUT /library/{library_id}/hls-encryption
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 |
Request Body
Content-Type: application/json
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | boolean | yes | true enables encryption for new uploads |
{ "status": true }Response
Success Response (200)
{ "status": true }
Important
- Changes take a few minutes to apply. Security settings are cached: allow up to ~6 minutes before the change affects playback, and responses may stay cached at the CDN for a short while after that.
- Unlike the strict playback mode, this switch has no dependency on
block_download.- Turning encryption off does not decrypt videos that were already encrypted.
Error Responses
| Status | When |
|---|---|
400 | status is not a boolean |
404 | Library not found |
500 | Internal error |
Example Usage
cURL
curl -X PUT \
"https://api-v2.pandavideo.com.br/library/{library_id}/hls-encryption" \
-H "Authorization: $PANDA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": true}'Related
- Read the current value:
GET /library/{library_id}/hls-encryption - Library settings that gate reprocessing: Get user library (
keep_original_files) - Apply encryption to existing videos: Video Reprocessing
400status must be a boolean
