> ## 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.

# Agency API

> Read your brands, campaigns, clips and campaign metrics, and create campaigns, from your own tools.

The Agency API is for agencies that run campaigns on ClipStake. It gives your
own tools the same data that your ClipStake dashboard shows.

Most endpoints read data and use `GET`. One endpoint writes:
`POST /campaigns` creates a campaign. Only an API key with write access can
use it. An API key cannot change a brand, a clip or an existing campaign.

> [card] [Quickstart](https://docs.clipstake.com/agency-api/quickstart.md)
>
> Create an API key and read your first campaign.

> [card] [Authentication](https://docs.clipstake.com/agency-api/authentication.md)
>
> Create, send and revoke API keys.

> [card] [Create campaigns](https://docs.clipstake.com/agency-api/create-campaigns.md)
>
> Create a campaign with an API key.

## What you can read

| Resource | What it contains |
| - | - |
| Brands | The brands that your agency manages. |
| Campaigns | Status, budget, platforms and rates for each campaign. |
| Campaign metrics | Views, spend, CPM and engagement for one campaign. |
| Campaign countries | The views and spend of one campaign for each country. |
| Clips | Views, engagement, status and payout for each clip. |

## What you can create

| Resource | What happens |
| - | - |
| Campaigns | A new campaign for one of your brands. It waits for payment. You fund and launch it in the dashboard. |

## Base URL

```text theme={null}
https://app.clipstake.com/api/v1/agency
```

## IDs

Each ID starts with a prefix that names its resource.

| Prefix | Resource |
| - | - |
| `brd_` | Brand |
| `cmp_` | Campaign |
| `clip_` | Clip |

An ID that your API key cannot read returns `404`. This includes an ID from
another agency and an ID with the wrong prefix.

## Money and metrics

* Amounts are integers in US cents. For example, `125000` is \$1,250.00.
* A clip payout is the gross amount. This is the amount that left the campaign
  budget.
* A metric that was not measured is `null`. It is never `0`.
* The `platform` of a campaign or a clip is `instagram`, `x`, `tiktok` or
  `youtube`. More values can be added. Accept values that you do not know.

> [!NOTE]
>
> Do you track media for your own users in the console? Use the
> [Console API](https://docs.clipstake.com/introduction.md) instead.


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