Plan a campaign
plan_campaign, 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.
Plan a campaign testing one of a Space's products on its saved segments (list_segments): the first batch's ads are chosen by coverage, each segment its share, over its awareness level's lead and the next one down and different hook kinds, each tagged and given an ad code. To test a delivered video on them, name it as sourceVideoId. To test a hypothesis, narrow the leads and hookKinds to try, or pins the combinations a round must hold; a pin that can't be placed is refused, saying why. Nothing is made or charged; change the ads with change_campaign_ad, then make the batch with prepare_campaign_batch. Pass a new requestKey; repeating one returns the same campaign.
apiKeyAuthorizationBearer <token>An API key (prb_…) from Settings → Connections.
application/json- body
spaceId*string^([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)$uuidname*string1 <= length <= 80productRecordId*stringThe Space's product to test (list_products)
^([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)$uuidsegmentRecordIds*array<>Saved segments of that product (list_segments), in the order to plan them
1 <= items <= 6ads*integerAt least one per segment
1 <= value <= 10lengthSeconds?numberHow long its videos run: 30 seconds if not said. Not with sourceVideoId
15304560sourceVideoId?stringA delivered video of the Space featuring the product, in no campaign yet, to test on these segments: it becomes the body of the segment it was aimed at, at no charge, and every other body is made from its brief, in its built-in format, at its length
^([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)$uuidleads?array<>The leads to try, for every round: each segment tries its own two where they're named, then the next named. All of them if not said
1 <= itemshookKinds?array<>The hook kinds to try, for every round: all of them if not said
1 <= itemspins?array<>Combinations every round must hold, each once, with coverage filling the rest: a chosen segment, and a lead and hook kind among those to try. In a segment's ads, in this order, so its first is its body, unless a source video is its body. Its share of ads grows to hold them: ads must hold every pin and a body for every other segment. plan_next_batch drops one a saved learning says lost
items <= 10requestKey*string^[\w.:-]+$8 <= length <= 64The tool's answer.
application/json- response
campaignId*string^([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)$uuidcurl -X POST 'https://studio.probably.co/api/v1/tools/plan_campaign' \ -H "Authorization: Bearer $PROBABLY_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "spaceId": "a330a273-e64a-4183-aedb-f3152797a9a5", "name": "string", "productRecordId": "325e8cde-b631-46f8-ab4d-a44e138f037a", "segmentRecordIds": [ "31e7be13-7414-4d91-a8c2-181a0c392d9e" ], "ads": 1, "requestKey": "stringst"}'{ "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf"}