Add videos to funnel

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
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

📘

Authorization

Requires a valid API Key in the Authorization header. Send the key directly — no Bearer prefix.

⚠️

is_first rule — strictly one

The use‑case requires exactly one video in videos[] with is_first: true. Zero is_first:true returns 400 "At least one video must be setted as first."; more than one returns 400 "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

HeaderValue
Authorization<your-api-key> (no Bearer prefix)

Request Body

Content-Type: application/json

Body Parameters

FieldTypeRequiredDescription
idstring (uuid)yesFunnel identifier.
videosarrayyesNon‑empty list of videos.
videos[].idstring (uuid)yesVideo identifier. Must already exist in the organization.
videos[].front_coordinates{ x: number, y: number }yesEditor position in the dashboard canvas.
videos[].is_firstbooleanyes (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_id updated to the funnel's folder_id (videos are auto‑moved into the funnel's folder).
  • Memcached entries for each video and the folder are invalidated.
  • The is_first flag is mass‑updated: every other video already in the funnel has is_first set to false.

Error Responses

  • 400 — empty videos[], zero or multiple is_first:true items, or one of videos[].id does 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 } }
    ]
  }'

Recipes

Body Params
uuid
required

Funnel ID to add videos to

videos
array of objects
required

List of videos to add with their coordinates

videos*
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