---
title: "Add or replace static audience members"
method: POST
path: "/audiences/{audienceKey}/members"
tags: ["audiences"]
---

# Add or replace static audience members

`POST /audiences/{audienceKey}/members`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/audiences/{audienceKey}/members`
- Auth: HTTP bearer

## Path parameters

- `audienceKey` string, required: audience stable key

## Request body

- object
  - `externalIds` string[]: External contact IDs, up to 1000
  - `mode` 'add' | 'replace': Default add

## Response `200`

Members updated

- object
  - `success` boolean, required
  - `audienceKey` string, required
  - `memberCount` number, required

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API key
- `404`: Audience or contact not found

---

[API](https://skmtc.dev/mailly/apis/mailly-api.md) · [All operations](https://skmtc.dev/mailly/apis/mailly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailly/apis/mailly-api/revisions/1ceb29637301?raw)
