---
title: "Add recipients to a draft"
method: POST
path: "/v1/campaigns/{id}/recipients"
tags: ["Campaigns"]
---

# Add recipients to a draft

`POST /v1/campaigns/{id}/recipients`

## Request

- Base URL: `https://api.mystars.tg`
- URL: `https://api.mystars.tg/v1/campaigns/{id}/recipients`
- Auth: API key in header `X-Api-Key`

Append up to 5,000 more usernames to a `draft` campaign (10,000 per
campaign in total). Each chunk needs its own `Idempotency-Key`: the same
key with the same body returns the chunk's original counts with `200`;
the same key with a different body is `409 idempotency_conflict`. A
campaign that is no longer a draft answers `409 conflict`. As on create, a
malformed or repeated username (including one already on the list) is
stored as a rejected row (`invalid_format`, `duplicate`) and never fails
the request. `400` is for the list itself: not a non-empty array of
strings, more than 5,000 entries, or a chunk that would take the
campaign past 10,000 rows (rejected rows count).

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Request body

- AddCampaignRecipientsRequest
  - `recipients` string[], required

## Response `200`

Idempotent replay of the same chunk.

- CampaignRecipientsAppended
  - `campaign_id` string, uuid, required
  - `batch` CampaignRecipientBatch, required: What one create or append request did: `submitted` = `accepted` (new rows to validate) + `rejected` (malformed or duplicate).
    - `submitted` integer, required
    - `accepted` integer, required
    - `rejected` integer, required

## Other responses

- `201`: Chunk stored.
- `400`: Malformed request (`bad_request`): a missing or invalid field, header or query parameter (the `message` names it), a malformed `cursor`, a body that is not valid JSON, or a body nested deeper than 64 levels. Send integer query parameters as plain decimal digits: the pricing, order, giveaway and series routes refuse any other spelling (a sign, decimal point, exponent, hex prefix or surrounding spaces) with a `400` naming the parameter. Fix the request; retrying it unchanged gets the same answer.
- `401`: Missing or invalid `X-Api-Key`.
- `403`: The API key is valid, but the tenant is suspended (for example after `/api_revoke` — run `/api_rotate` in the bot to restore access) or banned, or the product (campaigns, giveaways) is not enabled for it. Products are enabled per tenant on request. A source address blocked at our edge gets `403 forbidden` with the message `source blocked`, whatever the key.
- `404`: No such resource for this tenant (another tenant's id is also `404`).
- `409`: The request conflicts with the resource's state or with an earlier request: `idempotency_conflict`, `idempotency_in_flight` (with `Retry-After`), `conflict` (also an order `Idempotency-Key` reused with a different body, or an order cancel in a status other than `awaiting_payment`), or a giveaway refusal with its own code (`funding_received`, `use_close`, `limit_reached`, `attestations_frozen`, `attestation_limit_reached` with `limit`, `funding_order_open_in_other_currency` with `currency`, …).
- `413`: The request body is larger than 256 KB (`bad_request`, `request body too large`).
- `415`: A request body was sent with a `Content-Type` other than `application/json` (a missing one included), or with an unsupported charset or `Content-Encoding` (`bad_request`). A POST without a body needs no `Content-Type`.
- `429`: A rate limit was reached (`rate_limited`). See **Rate limits** in the overview. Which `429`s carry headers: - **Per-minute buckets** — the general request budget, the order-lifecycle bucket, the pricing/recipient-check probe cap (60 req/min), the campaign bucket, and your giveaway read, write, quote and attestation buckets. Every answer metered by one carries `RateLimit-Policy`, `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds); a `429` adds `Retry-After` (seconds). - **Caps, no `Retry-After`** — the daily intake cap and the daily order cap on `POST /v1/orders` (UTC day), the per-recipient guard on unfinished orders to one `@username`, and the cap on live campaigns. These `429`s carry no `Retry-After`, but they do carry the `RateLimit-*` headers of the per-minute bucket the request passed (often with `RateLimit-Remaining` above zero): branch on `Retry-After`, never on `RateLimit-Remaining`. Back off; the daily intake and order caps clear at the next UTC midnight. - **The daily budget of ineligible-recipient refusals** on `POST /v1/orders` — its `429` carries `Retry-After` and `error.retry_after`, both the seconds until 00:00 UTC, when the budget resets, plus the `RateLimit-*` headers of the order bucket it passed. `error.retry_after` is what sets it apart from the other `429`s. While the budget's places are held only by your own checks still running, the create answers a short `429` instead: `Retry-After` of a few seconds and no `error.retry_after` — retry after `Retry-After`. - **The giveaway quote budget shared by all tenants** — its `429` carries `Retry-After` (seconds until the shared budget reopens) and the `RateLimit-*` headers of your own quote bucket, never figures for the shared budget. - **Edge throttle** — a coarse per-IP throttle in front of the API answers the same envelope with `Retry-After: 1` and no `RateLimit-*` headers.

## Changes

- **2026-10-31** `9f589c4dd26b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/changes/v1/campaigns/:id/recipients/post.md)

---

[API](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api.md) - [All operations](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/revisions/b6cdc8aff8c2?raw)
