Update the name, description, or video list of an existing A/B test. Only the fields included in the request body will be updated.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
PUT /comparison/{id}?type=update
{id}?type=updateUpdates an A/B test's name, description and/or attached variants.
AuthorizationRequires a valid API Key in the
Authorizationheader. Send the key directly — noBearerprefix.
?type=updateis requiredMissing or wrong
typereturns400 "Type not specified".
Variants only mutable whileDRAFTThe server‑side rule is: if
status !== "DRAFT",video_idsis silently ignored —name/descriptionstill update, but the variant list does not change. Even so,video_idsis 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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Comparison id (starts with 636f6d70-). |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | yes | Must be update. |
duplicate | string (uuid) | no | When 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string (1–255) | yes | New name. |
description | string | yes | New description (empty string allowed). |
video_ids | array of string (uuid) | yes | Unique 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). OnDRAFTthe S3 file is not regenerated by this endpoint. - Audit logs:
category: comparison, activity: renamewhennamechanged.category: comparison, activity: duplicate_videowhenvideo_idsdiffers and?duplicate=<id>was sent.
Error Responses
- 400 — body fails the AJV schema (missing
name/description/video_ids, duplicates, invalid UUID v4, extra properties, orname.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"
]
}'