post
https://api-v2.pandavideo.com.br/playlists//videos
Adds one or more videos to a playlist
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
POST /playlists/{playlist_id}/videos
{playlist_id}/videosAdds one or more videos to a playlist. Order is either explicit per item or auto‑incremented by the server.
AuthorizationRequires a valid API Key in the
Authorizationheader. Send the key directly — noBearerprefix.
videos[]is an array of objects (not strings)The body is a JSON array at the top level — each item is
{ video_id, order? }. Unlike Funnel'sremove_videos(plain string array), Playlist endpoints always carry the wrapped object shape.
Hard cap: 500 videos per playlistServer‑side guard:
existing_count + new_videos > 500returns 400"Playlist cannot have more than 500 videos".
HTTP Method & Path
POST /playlists/{playlist_id}/videos
Base URL: https://api-v2.pandavideo.com.br
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playlist_id | string (uuid) | yes | Playlist identifier. |
Request Body
Content-Type: application/json — a top‑level array.
Item shape
| Field | Type | Required | Description |
|---|---|---|---|
video_id | string (uuid) | yes | Video to add. Must belong to the authenticated user (cross‑user IDs return 400 "Videos not found: …"). |
order | integer ≥ 0 | no | Position. If omitted, the server uses max(order in batch) + 1. |
playlist_id | string (uuid) | no | Optional echo of the playlist id; the path is authoritative. The dashboard always sends it for symmetry. |
[
{ "video_id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6", "order": 0, "playlist_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" },
{ "video_id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d7", "order": 1, "playlist_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
]
Re‑adding a video updates its order. The bulk insert runs withupdateOnDuplicate: ['order']. So sending an existing(playlist_id, video_id)pair simply updates theorder. This is also how the dashboard implements reorder — it re‑POSTs the full list.
Response
Success Response (200)
Returns the array of inserted/updated records.
[
{ "playlist_id": "a1b2c3d4-...", "video_id": "f1f2f3f4-...d5d6", "order": 0 },
{ "playlist_id": "a1b2c3d4-...", "video_id": "f1f2f3f4-...d5d7", "order": 1 }
]Side effects
- Playlist
durationandvideos_quantityare recomputed server‑side fromplaylist_videos + video.metadata.length. - Memcache key
playlist_details_{playlist_id}is invalidated.
Error Responses
- 400 —
"Videos must be an array","No videos provided","Each video must have a video_id","Video order must be a number","Videos not found: …", or"Playlist cannot have more than 500 videos". - 401 — missing/invalid API Key.
- 500 — ownership rejected or internal error.
Example Usage
cURL
curl --request POST \
--url 'https://api-v2.pandavideo.com.br/playlists/a1b2c3d4-e5f6-7890-abcd-ef1234567890/videos' \
--header 'Authorization: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '[
{ "video_id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6", "order": 0 }
]'