Campaign Plans

Create a Campaign Plan

Creates a Campaign Plan. A Campaign Plan is the AdCrunch planning document. It is not a provider campaign. For provider campaigns, see the entities in the Observe API.

Only a name, a description and a currency are necessary. You write the window, the budget envelope and the Brand one part at a time. Write each amount in whole units of the currency: 40.5 is €40.50.

The new plan starts in draft. The answer is 409 if the slug already exists in your organization.

post/context/campaign-plans

Request

  • Base URL: https://api.adcrunch.dev
  • URL: https://api.adcrunch.dev/context/campaign-plans
  • Auth: HTTP bearer

Request body

brand_namestring

The Brand's slug. Optional and re-pointable — a Campaign Plan may precede its brand or cover a portfolio. Addressed by slug because that is the handle every Context surface uses; the Campaign Plan stores the id.

currencystring required

ISO 4217. Editable while no Line Item carries a budget, frozen thereafter.

descriptionstring required

One-line summary — what a reader picks this Campaign Plan by.

end_datestring

Omit for an always-on plan. Line Items inherit this.

measurementstring

How success will be judged (markdown).

namestring required

Display name.

rationalestring

The argument for the split — what a reviewer approves (markdown).

slugstring

Optional explicit slug handle; normalized to kebab-case. Defaults to one derived from the name.

start_datestring
total_budgetnumber

The envelope: what we have. Omit for "no declared constraint" — which is not the same as zero.

Example request

{
  "brand_name": "acme",
  "currency": "EUR",
  "description": "The spring sale of Acme, on Meta, in France and Belgium.",
  "end_date": "2026-05-31",
  "measurement": "Revenue in the window, against the spring of 2025.",
  "name": "Spring Sale 2026",
  "rationale": "Meta carries the reach. One Line Item keeps the budget in one place.",
  "slug": "spring-sale",
  "start_date": "2026-03-01",
  "total_budget": 5000
}

Response

The Campaign Plan as created, in draft, at revision 1, with no rows. allocation.allocated is 0 and unallocated is the whole envelope.

brandIdstring nullable required

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

createdAtnumber required

Milliseconds since the Unix epoch, UTC.

createdBystring required
currencystring required

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

descriptionstring required
endDatestring nullable required

A calendar date, YYYY-MM-DD.

idstring required
measurementstring nullable required
namestring required
rationalestring nullable required
revisionnumber required

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

slugstring required
startDatestring nullable required

A calendar date, YYYY-MM-DD.

status'draft' | 'approved' required

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

totalBudgetnumber nullable required
updatedAtnumber nullable required

Milliseconds since the Unix epoch, UTC.

Example response

{
  "allocation": {
    "allocated": 0,
    "comparable": true,
    "unallocated": 5000,
    "unit": null
  },
  "brandId": "brd_6a9c33",
  "createdAt": 1768435200000,
  "createdBy": "usr_5d2b71",
  "currency": "EUR",
  "description": "The spring sale of Acme, on Meta, in France and Belgium.",
  "endDate": "2026-05-31",
  "id": "cpl_4e1a08",
  "lineItems": [],
  "measurement": "Revenue in the window, against the spring of 2025.",
  "name": "Spring Sale 2026",
  "rationale": "Meta carries the reach. One Line Item keeps the budget in one place.",
  "revision": 1,
  "slug": "spring-sale",
  "startDate": "2026-03-01",
  "status": "draft",
  "totalBudget": 5000,
  "updatedAt": null
}

Changes

No recorded changes to this operation across all 1 revision of this API.