---
title: "Batch Add Campaign Members"
method: POST
path: "/v2/campaigns/{campaignId}/members/batch"
---

# Batch Add Campaign Members

`POST /v2/campaigns/{campaignId}/members/batch`

## Request

- Base URL: `https://pub-api.conversion.ai/api`
- URL: `https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}/members/batch`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in query parameter `api_key`

Add up to 200 members to a custom campaign by email, creating contacts that do not exist yet. Adding is an idempotent upsert: a contact already in the campaign has its status updated instead of being added twice.

Status progression is forward-only for existing members; requesting their current or an earlier status leaves it unchanged. Set a status by `statusId` or `status` from `GET /v2/campaigns/{campaignId}`, or omit both to use the campaign type's first status. Members are processed independently, so one can fail while the rest of the batch succeeds.

## Path parameters

- `campaignId` string, uuid, required

## Request body

- object
  - `members` object[], required: An array of members to add to the campaign.
    - `email` string, email, required: The member's email address, normalized (trimmed and lowercased) before matching. An invalid email fails that member's row with `invalid_email` and creates no contact.
    - `statusId` string, uuid: The campaign status id to place the member in, as returned by `GET /v2/campaigns/{campaignId}`. Takes precedence over `status`. An id that is not a status of the campaign's type fails that member's row.
    - `status` string: The campaign status name, case-insensitive. Used only when `statusId` is not set.

## Response `200`

Batch processed. Check the counts and each result for per-member success or failure.

- object
  - `data` object
    - `processed` integer, required: The total number of members in the batch.
    - `succeeded` integer, required: The number of members added or updated.
    - `failed` integer, required: The number of members that failed.
    - `results` object[], required: An array of result objects in the same order as the input `members` array.
      - `email` string, required: The member's email address from the request.
      - `success` boolean, required: `true` if the member was successfully added or updated.
      - `campaignMemberId` string, uuid: The campaign member id. Present on success.
      - `contactId` string, uuid: The id of the member's contact, created if it did not exist. Present on success.
      - `error` string: A machine-readable error code. Present on failure: `invalid_email`, `invalid_campaign_status`, or `upsert_failed`.
      - `message` string: A human-readable error description. Present on failure.

## Other responses

- `400`: The request was malformed.
- `401`: Authentication failed.
- `404`: The requested resource was not found.
- `500`: An unexpected server error occurred.

---

[API](https://skmtc.dev/conversion/apis/conversion-api.md) - [All operations](https://skmtc.dev/conversion/apis/conversion-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conversion/apis/conversion-api/revisions/8422f815402a?raw)
