Перейти к содержимому

Launch a quoted draft

Это содержимое пока не доступно на вашем языке.

scope campaigns:spendwritesmoves money

Launches the draft that a quoteId priced: reserves its budget from the brand’s wallet and sends the campaign for review, exactly as the brand’s own Publish button does.

Everything the agent is told about this tool

Launches the draft that a quoteId priced: reserves its budget from the brand’s wallet and sends the campaign for review, exactly as the brand’s own Publish button does. A person at CountViews looks at every campaign before any creator can see it: the campaign is in_review (event campaign.in_review), then either goes live (campaign.activated) or is refused (campaign.rejected with a code and a note, and the whole reserve returns). The test space skips this review. THIS MOVES MONEY, so it may answer status: approval_required instead of launching — then NOTHING was spent: a person has been emailed and must approve in their workspace (approveAt). When that happens, tell the human to approve and do NOT retry or ask again; check approval_status or events_list for campaign.in_review or approval.rejected. (With a test key nobody is waiting at a screen: the test space answers yes for the person about 5 seconds after the request, on your next call after that — wait, then call approval_status, and again every 5 seconds; it is normally approved within two or three tries.) Only a token the brand gave an automatic limit launches without a person, and never above the daily and monthly caps (cap_exceeded is a refusal, not a question). Send an idempotencyKey: the same key and quote returns the first answer instead of acting twice. insufficient_balance (402), quote_stale, quote_expired, quote_used, quote_kind_mismatch (a top-up quote; finish it with campaign_budget_add) and cap_exceeded (409) all mean nothing was spent. Example: {"quoteId": "<quoteId from campaign_quote_issue>", "idempotencyKey": "launch-spring-2026-1"}.

Name Type Required Description
quoteId string yes The quoteId that campaign_quote_issue returned. A quote is good once, for a few minutes, for the draft as it was quoted.
idempotencyKey string no Any unique string for this attempt, for example a UUID. Sending the same key and body again returns the first answer instead of writing twice.
dryRun boolean no When true, runs every check and returns what would happen, and keeps nothing: no draft, no log entry, no event.

A write: send an idempotencyKey (any unique string for this one intent). A call with dryRun: true needs none.

curl https://countviews.com/api/public/v1/call \
-H "Authorization: Bearer $COUNTVIEWS_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"campaign_activate","arguments":{"quoteId":"0199aaaa-bbbb-7ccc-8ddd-eeeeffff0001","idempotencyKey":"launch-spring-2026-1"}}'