API reference
Playback IDs API
Each video has one or more playback IDs, public or signed, each revocable on its own.
Add a playback ID
POST /v1/assets/{id}/playback-ids
Adds a playback ID. A signed one plays only with a token your backend signs; a public one plays for anyone with the URL.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
Idempotency-Key | header | string | no | A retry with the same key and request returns the first response; a different request is 422 idempotency_key_reused. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
policy | "signed", "public" | yes |
{
"policy": "public"
}Response 201
Created
{
"id": "pid_01jmgkyp0c3ct46ees12paekfv",
"policy": "public",
"playable": true,
"status": "active"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 409 | asset_deleted |
| 409 | too_many_playback_ids |
| 409 | idempotency_in_progress |
| 422 | idempotency_key_reused |
| 429 | rate_limited |
Revoke a playback ID
DELETE /v1/assets/{id}/playback-ids/{pid}
Revokes a playback ID: 200 revoked once it is unpublished, 202 revoking before. Its playback stops; the asset's other IDs keep playing.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
pid | path | string | yes |
Response 200
Revoked
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": false,
"status": "revoked"
}Response 202
Revoking
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": false,
"status": "revoking"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |