Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

Duplicate a Campaign Plan

Duplicates a Campaign Plan: one new Campaign Plan, with a copy of each of its Line Items. Use it to run the same plan again, for example each month.

The copy keeps the name, the summary, the body, the currency, the envelope, the window and the Brand. Each Line Item keeps its name, channel, objective, countries, age range, gender, Persona, ad account, budget, window and target. The copy keeps the dates: edit them after the duplicate.

The copy does not keep the Executions, the Comments, the Assignees, the Favorites or the approval. The copy and each Line Item start in draft, at revision 1. A deleted Brand or a deleted Persona is not copied. The source does not change.

One write holds the copy and its Line Items. When it fails, no copy stays.

POST/context/campaign-plans/{slug}/duplicate
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Path parameters
slugstringrequired
Request body
requiredapplication/json
namestring

The name of the copy. Omit for the name of the source followed by " (copy)", cut to 120 characters.

min length 1 · max length 120
slugstring

The slug of the copy; normalized to kebab-case. Omit to derive it from the name: when that slug is taken, the copy takes -2, then -3, up to the first free one. A slug that you send and that is taken is 409.

max length 120
Responses
201

The copy, in draft, at revision 1. lineItemCount counts the copied Line Items. List them with GET /campaign-plans/{slug}/line-items.

allocationobjectrequired

Derived on every read. Never stored.

Show properties
allocatednumber | nullrequired

The sum of the Line Item budgets. null when the lines mix units, because that sum would be meaningless.

comparablebooleanrequired

False when the lines mix totals and daily rates. A surface must then print "not comparable" rather than a plausible-looking wrong total.

unallocatednumber | nullrequired

The envelope less the allocated, where both are known.

unitstring | nullrequired

The shared unit, when the lines agree on one.

Allowed:totaldaily
assigneesobject[]required

The current members who are accountable for the record, oldest first, at most 10. An Assignee grants no access. A member who left is not listed.

Show properties
Array of object
idstringrequired

The usr_… id of the member.

namestringrequired

The name of the member.

bodystring | nullrequired

The long document of the Campaign Plan, in markdown, or null when nobody wrote it. The list answers the description, never the body.

brandobject | nullrequired

The name and the slug of the Brand, to show and link it. Null when the plan has no Brand, or when its Brand was deleted.

Show properties
namestringrequired
slugstringrequired
brandIdstring | nullrequired

Nullable and mutable: a plan may precede its brand, cover a portfolio, or be re-pointed. Deleting a Brand leaves its plans standing.

commentCountnumberrequired

The number of live Comments on the plan, replies included. List them with GET /campaign-plans/{slug}/comments.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystringrequired
currencystringrequired

Editable until the first Line Item budget, and frozen thereafter.

descriptionstringrequired
endDatestring | nullrequired

A calendar date, YYYY-MM-DD.

idstringrequired
lineItemCountnumberrequired

The number of live Line Items of the plan. List them with GET /campaign-plans/{slug}/line-items.

namestringrequired
revisionnumberrequired

Increments on every write. Send it back as base_revision to edit; a stale one answers 409.

slugstringrequired
startDatestring | nullrequired

A calendar date, YYYY-MM-DD.

statusstringrequired

The only two stored states. active, closed and "executed" are derived, never stored.

Allowed:draftapproved
totalBudgetnumber | nullrequired
updatedAtnumber | nullrequired

Milliseconds since the Unix epoch, UTC.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed.

issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:organization_unentitled
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold campaign_plan:write. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

404

No Campaign Plan with that slug. error is not_found.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

409

The slug that you sent is taken. error is slug_conflict.

slugstringrequired

The slug that is already taken.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:slug_conflict
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

422

invalid_slug: the name or the slug holds no letter or digit.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X POST 'https://api.adcrunch.dev/context/campaign-plans/string/duplicate' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Spring Sale 2027"
}'
Response
{
  "allocation": {
    "allocated": 2500,
    "comparable": true,
    "unallocated": 2500,
    "unit": "total"
  },
  "assignees": [],
  "body": "## Why this split\n\nMeta carries the reach. One Line Item keeps the budget in one place.\n\n## How it will be judged\n\nRevenue in the window, against the spring of 2025.",
  "brand": {
    "name": "Acme",
    "slug": "acme"
  },
  "brandId": "brd_6a9c33",
  "commentCount": 0,
  "createdAt": 1769040000000,
  "createdBy": "usr_4d8b12",
  "currency": "EUR",
  "description": "The spring sale of Acme, on Meta, in France and Belgium.",
  "endDate": "2026-05-31",
  "id": "cpl_9b3f51",
  "lineItemCount": 1,
  "name": "Spring Sale 2026 (copy)",
  "revision": 1,
  "slug": "spring-sale-2026-copy",
  "startDate": "2026-03-01",
  "status": "draft",
  "totalBudget": 5000,
  "updatedAt": null
}

Was this page helpful?