Update A/B Test

Update the name, description, or video list of an existing A/B test. Only the fields included in the request body will be updated.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

PUT /comparison/{id}?type=update

Updates an A/B test's name, description and/or attached variants.

📘

Authorization

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

🚧

?type=update is required

Missing or wrong type returns 400 "Type not specified".

⚠️

Variants only mutable while DRAFT

The server‑side rule is: if status !== "DRAFT", video_ids is silently ignoredname/description still update, but the variant list does not change. Even so, video_ids is required in the body by the AJV validator. Send the current list when you only want to rename a running/completed test.

HTTP Method & Path

PUT /comparison/{id}?type=update

Base URL: https://api-v2.pandavideo.com.br

Path Parameters

NameTypeRequiredDescription
idstringyesComparison id (starts with 636f6d70-).

Query Parameters

NameTypeRequiredDescription
typestringyesMust be update.
duplicatestring (uuid)noWhen present together with a changed video_ids list, an audit event duplicate_video is logged with this video id. Used by the dashboard's "Duplicate variant" flow.

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
namestring (1–255)yesNew name.
descriptionstringyesNew description (empty string allowed).
video_idsarray of string (uuid)yesUnique UUID v4s. Applied only when status is DRAFT; otherwise the server silently keeps the existing list.
{
  "name": "Thumb test — Q1 (renamed)",
  "description": "Comparing 3 thumbnails for the welcome video.",
  "video_ids": [
    "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6",
    "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d7",
    "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d8"
  ]
}

Response

Success Response (200)

Returns the updated comparison plus pullzone (same shape as Get A/B Tests Properties).

Side effects

  • When the status is not DRAFT, the S3 config is rewritten on success (status + variants). On DRAFT the S3 file is not regenerated by this endpoint.
  • Audit logs:
    • category: comparison, activity: rename when name changed.
    • category: comparison, activity: duplicate_video when video_ids differs and ?duplicate=<id> was sent.

Error Responses

  • 400 — body fails the AJV schema (missing name/description/video_ids, duplicates, invalid UUID v4, extra properties, or name.length > 255). Also "Type not specified" when the query is missing.
  • 404"Comparison not found", or "Video not found" (only checked when status ≠ DRAFT — the validator pre‑checks the videos exist for the user before applying the no‑op).
  • 401 — missing/invalid API Key.
  • 500"Library not found" or internal error.

Example Usage

cURL

curl --request PUT \
  --url 'https://api-v2.pandavideo.com.br/comparison/636f6d70-e29b-41d4-a716-446655440000?type=update' \
  --header 'Authorization: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Thumb test — Q1 (renamed)",
    "description": "Comparing 3 thumbnails for the welcome video.",
    "video_ids": [
      "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6",
      "f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d7"
    ]
  }'

Recipes

Path Params
uuid
required

Unique ID of the A/B test (prefix 636f6d70-)

Query Params
string
required
Defaults to update

Operation type. Must be "update".

Body Params
string

New name for the A/B test

string

New description for the A/B test

video_ids
array of strings

List of video UUIDs to include in the test

video_ids
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json