Discard a campaign draft
scope campaigns:writewriteslive key only
Deletes one of the brand’s drafts, named by slug or by the externalRef you gave it.
Everything the agent is told about this tool
Deletes one of the brand’s drafts, named by slug or by the externalRef you gave it. A discarded draft is gone, so ask the brand before calling it. Only a draft can be discarded: a campaign that has been published has a ledger behind it and is refused with not_a_draft (409), and a draft a person was asked to approve keeps its history (draft_has_approval_history). Pass dryRun: true to check without deleting; send an idempotencyKey. Example: {"campaign": "spring-2026", "idempotencyKey": "discard-spring-2026"}.
Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
campaign |
string |
yes | The campaign’s slug, or the externalRef you gave it. |
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.
Example
Section titled “Example”curl https://countviews.com/api/public/v1/call \ -H "Authorization: Bearer $COUNTVIEWS_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"campaign_draft_discard","arguments":{"campaign":"spring-2026","idempotencyKey":"discard-spring-2026"}}'{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "campaign_draft_discard", "arguments": { "campaign": "spring-2026", "idempotencyKey": "discard-spring-2026" } }}{ "campaign": "spring-2026", "idempotencyKey": "discard-spring-2026"}