post
https://api-v2.pandavideo.com.br/funnels/add_videos
Adds one or more videos to an existing funnel with position coordinates and first video designation
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
POST /funnels/add_videos
Adds one or more videos to an existing funnel, positioning each in the editor and marking one as the funnel's entry point.
AuthorizationRequires a valid API Key in the
Authorizationheader. Send the key directly — noBearerprefix.
is_firstrule — strictly oneThe use‑case requires exactly one video in
videos[]withis_first: true. Zerois_first:truereturns400 "At least one video must be setted as first."; more than one returns400 "Only one video can be setted as first.". This rule is not in the OpenAPI schema — it is enforced by the business logic.
HTTP Method & Path
POST /funnels/add_videos
Base URL: https://api-v2.pandavideo.com.br
Authentication Requirements
| Header | Value |
|---|---|
Authorization | <your-api-key> (no Bearer prefix) |
Request Body
Content-Type: application/json
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | Funnel identifier. |
videos | array | yes | Non‑empty list of videos. |
videos[].id | string (uuid) | yes | Video identifier. Must already exist in the organization. |
videos[].front_coordinates | { x: number, y: number } | yes | Editor position in the dashboard canvas. |
videos[].is_first | boolean | yes (on exactly one item) | Marks the funnel's entry video. Exactly one item in the array must have true. |
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"videos": [
{
"id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6",
"front_coordinates": { "x": 120, "y": 50 },
"is_first": true
},
{
"id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d7",
"front_coordinates": { "x": 360, "y": 50 }
}
]
}Response
Success Response (200)
{ "message": "Videos added to funnel successfully" }
Side effects.
- Each video has its
folder_idupdated to the funnel'sfolder_id(videos are auto‑moved into the funnel's folder).- Memcached entries for each video and the folder are invalidated.
- The
is_firstflag is mass‑updated: every other video already in the funnel hasis_firstset tofalse.
Error Responses
- 400 — empty
videos[], zero or multipleis_first:trueitems, or one ofvideos[].iddoes not exist in the organization ("Video does not exist."). - 403 — user does not belong to the funnel's organization.
- 404 — funnel does not exist.
- 401 — missing/invalid API Key.
- 500 — internal error.
Example Usage
cURL
curl --request POST \
--url 'https://api-v2.pandavideo.com.br/funnels/add_videos' \
--header 'Authorization: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"videos": [
{ "id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6", "front_coordinates": { "x": 120, "y": 50 }, "is_first": true },
{ "id": "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d7", "front_coordinates": { "x": 360, "y": 50 } }
]
}'