Skip to content
Docs
Open Escouade
Documentation contents

Docs › Mail › Tools

set_contact_audiences

View as .md

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

ParameterTypeRequiredDescription
emailstringyesExact address of the existing record.
audience_idslist of stringyesThe audiences the contact belongs to (aud_…): this list replaces the previous one.

Call it

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