> For an agent: the map of this documentation is at https://escouade.io/en/mail/docs/llms.txt; every page exists in Markdown, at the same address with `.md` appended.

# `set_contact_audiences`

Choose a contact's audiences.

Replaces all of the contact's memberships with audience_ids (empty: none). A new membership copies the global record; kept ones keep their customisations. Does not resubscribe unsubscribed contacts and does not change campaigns already scheduled. Sends nothing.

## Access

- **Key**: an Escouade Mail key with `send`.
- **Space**: a verified space.
- **Changes nothing**: no, it acts.
- **Safe to replay**: use an `idempotency_key` where the tool offers one.

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `email` | string | yes | Exact address of the existing record. |
| `audience_ids` | list of string | yes | The audiences the contact belongs to (aud_…): this list replaces the previous one. |

## Call it

```sh
curl -s https://api.subagent.fr/v1/set_contact_audiences \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sak_…' \
  -d '{"email": "…", "audience_ids": "…"}'
```

The full page in French, with the response fields and every refusal the tool can return: [/mail/docs/reference/set_contact_audiences](https://escouade.io/mail/docs/reference/set_contact_audiences).
