> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clipstake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create campaigns

> Create a campaign for one of your brands with an API key.

`POST /campaigns` creates a campaign. It runs the same checks as the campaign
form in the dashboard.

## Before you start

* Use an API key with write access. See
  [Authentication](https://docs.clipstake.com/agency-api/authentication.md).
* Your agency must be able to create campaigns. If it cannot, the request
  returns `403`. Book a call with ClipStake to turn this on.
* Get the brand ID from `GET /brands`.

## Create a campaign

```bash theme={null}
curl "https://app.clipstake.com/api/v1/agency/campaigns" \
  --request POST \
  --header "Authorization: Bearer ck_live_..." \
  --header "Content-Type: application/json" \
  --data '{
    "brand_id": "brd_3f9c0a1b2c3d4e5f60718293a4b5c6d7",
    "name": "Autumn Roast Launch",
    "instructions": "Post a 15 to 45 second clip that shows the new roast.",
    "content_type": "clipping",
    "budget_cents": 500000,
    "platforms": [
      { "platform": "instagram", "cpm_cents": 200 },
      { "platform": "x", "cpm_cents": 150 }
    ],
    "max_payout_per_clip_cents": 50000,
    "min_views": 1000
  }'
```

The response is the new campaign, in the same format as
`GET /campaigns/{campaign_id}`. Its `status` is `pending_payment`.

## After you create it

The API does not move money. To start the campaign:

1. Open the campaign in the dashboard.
2. Fund the budget and the ClipStake fee.
3. Launch the campaign.

To make a `private` campaign, set `eligibility` to `private`. Then invite
creators in the dashboard. Only invited creators can submit clips.

## Rates

Each platform needs a rate in `cpm_cents`: the amount for 1,000 views, in
cents. You can create campaigns for `instagram` and `x`.

To pay by the country of the viewers, send `geo_targeting`:

* `include` rules pay their rate for views from their countries. Views from
  other countries earn nothing.
* One `exclude` rule pays nothing for views from its countries, and pays its
  rate for views from every other country.

Send `include` rules or one `exclude` rule, never both. Geo targeting needs
`instagram`, and cannot be used with `x`. With geo targeting, set each
platform's `cpm_cents` to `null`.

To keep a share for your agency, send `agency_cpm_cents`. Creators earn each
rate less this amount. It must be less than every rate in the campaign.

## Retries

Each campaign name can be used one time per brand. If you send the same
request again after it succeeded, it returns `409 conflict`. No second
campaign is created. Use `GET /campaigns?brand_id=` to find the campaign.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.