---
search:
  tags:
    - Brands
    - POST
seo:
  description: >-
    Attaches an advertiser to a Brand. An agent that works on that… Reference
    for the POST /context/brands/{slug}/advertisers endpoint in the AdCrunch
    API.
sidebar:
  label: Attach an advertiser
  badge: POST
title: Attach an advertiser
type: openapi-operation
---
Attaches an advertiser to a Brand. An agent that works on that advertiser can then find this brand context. Send the same call again for the same result: the pair is the key, so a second attach writes nothing and still answers `201`. AdCrunch reads the provider from the advertiser. It does not take the provider from you. A Brand takes several advertisers, and an advertiser takes several Brands.

`POST /context/brands/{slug}/advertisers`

**Request body** (`application/json`, required)

- `advertiser_id` (string, required)

Request body example:

```json
{
  "advertiser_id": "acc_1203456789012345"
}
```

**Responses**

- `201` — Attached. Idempotent: attaching an account that is already attached answers the same way. \`provider\` is what AdCrunch resolved from the advertiser, never what you sent.
- `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.
- `401` — No API key, or one that does not resolve. See the security scheme. \`error\` is \`unauthorized\`.
- `402` — The organization has no active subscription. An owner subscribes at \`paywallUrl\`. \`error\` is \`organization\_unentitled\`.
- `403` — The caller does not hold \`brand:write\`. \`error\` is \`forbidden\`.
- `404` — No Brand with that slug. \`error\` is \`not\_found\`.
- `422` — That advertiser is not connected to this organization. \`error\` is \`advertiser\_not\_owned\`. Ownership is checked against the integration database at write time, because there is no foreign key across databases.

Response example, 201:

```json
{
  "advertiserId": "acc_1203456789012345",
  "provider": "meta"
}
```
