Probably
Docs

Prepare a campaign batch

prepare_campaign_batch, in Changes: A connection or key that may make changes. None spends credits; prepare_* and stage tools (research, brainstorm, write_script, review, generate_clip, voice, storyboard) prepare paid work for confirm_spend.

POST
/api/v1/tools/prepare_campaign_batch

Prepare making a planned batch: each segment's body, a video aimed at the segment, starts once confirmed. The preview has each body's credits and the total, or, charged at quotes, the batch's quote: its price, which confirming makes it at (a price that changed since is refused with the new one: prepare again), with quote.mostCredits, the most correction rounds can bring it to, to show first. Its openings are prepared with prepare_campaign_openings once their body is delivered. Show the person the preview. If the connection may spend, call confirm_spend with the confirmationId once they agree; otherwise send them the confirmUrl to confirm it in the studio. It expires in 15 minutes. Pass a new requestKey; repeating one returns the same confirmation.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (prb_…) from Settings → Connections.

Request Body

application/json
  1. body
batchId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
requestKey*string
Match^[\w.:-]+$
Length8 <= length <= 64

Response Body

The tool's answer.

application/json
  1. response
spaceId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
confirmationId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
expiresAt*string
preview*||||||
confirmUrl*|null
curl -X POST 'https://studio.probably.co/api/v1/tools/prepare_campaign_batch' \  -H "Authorization: Bearer $PROBABLY_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "batchId": "0d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6",  "requestKey": "batch-trailguard-1"}'
{  "spaceId": "5b0e7c1a-3f52-4d8e-9a61-2c4f8e9d7b30",  "confirmationId": "e7a1b2c3-d4e5-4f60-8172-93a4b5c6d7e8",  "expiresAt": "2026-10-25T09:15:00.000Z",  "preview": {    "kind": "campaign-batch",    "bodies": [      {        "code": "AD-7K3Q9X",        "credits": null      },      {        "code": "AD-M4RT8C",        "credits": null      }    ],    "totalCredits": 1344,    "openings": 2,    "availableCredits": 1840,    "fits": true,    "quote": {      "priceCredits": 1344,      "mostCredits": 3494,      "pricingVersion": "2026-10-26.1",      "lines": [        {          "line": "script",          "credits": 120        },        {          "line": "stills",          "credits": 192        },        {          "line": "voice",          "credits": 112        },        {          "line": "clips",          "credits": 716        },        {          "line": "finish",          "credits": 204        }      ],      "corrections": {        "rounds": [          {            "line": "script",            "credits": 25          },          {            "line": "stills",            "credits": 30          },          {            "line": "voice",            "credits": 25          },          {            "line": "clips",            "credits": 270          },          {            "line": "finish",            "credits": 25          }        ],        "maxRoundsPerStage": 3,        "maxRounds": 10,        "maxCredits": 2150      }    },    "sandbox": false  },  "confirmUrl": null}