> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/api-documentation/chat/broadcast/upload-a-recipient-list.md).

# Upload a recipient list

Creates a recipient list from a CSV or XLSX file, for use in campaigns.

**File format**

* The first row must be headers and include `phone_number` and `name`. Other columns are saved as extra recipient data.
* Up to 5,000 contacts, 100 columns and 10 MB. Only the first worksheet is read.
* Phone numbers: non-digits are removed and a leading `0` becomes `62`. Rows with fewer than 7 digits are skipped, and duplicate numbers are kept once.

Contacts are imported in the background. Poll `GET /api/recipients` until `total_contacts` for the list matches the `total_contacts` returned here before creating a campaign.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Broadcast","description":"Use these endpoints to manage WhatsApp message templates, upload recipient lists, and run broadcast campaigns.\n\n## Typical flow\n1. **Create a template** with `POST /templates`. Meta reviews it; its `status` starts as `PENDING`.\n2. **Check approval** with `GET /api/templates`. Only templates with `status: APPROVED` can be sent. If you created or edited templates directly in Meta, call `POST /templates/sync` first to copy them into Cekat.\n3. **Send to one contact** with `POST /templates/send`, or continue below to send to many.\n4. **Upload a recipient list** with `POST /api/recipients`. Contacts are imported in the background; poll `GET /api/recipients` until the list's `total_contacts` matches the number returned by the upload.\n5. **Create a campaign** with `POST /api/campaigns`, using the template's `wa_template_id` as `template_id`. Leave out `schedule_at` to send right away.\n6. **Track results** with `GET /api/campaigns` for totals and `GET /api/v2/campaigns/{id}/messages` for each recipient's delivery status and replies.\n\nEvery step needs the `inbox_id` of a connected WhatsApp inbox. Get it from `GET /api/inboxes` (the `id` of an inbox whose `type` is `whatsapp`).\n"}],"servers":[{"url":"https://api.cekat.ai","description":"Production"}],"security":[{"CekatApiKey":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your business's Cekat API key, from **Settings → Developers & API** in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans."},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same Cekat API key, sent as `Authorization: Bearer YOUR_API_KEY`. Accepted only by endpoints under `/api/...`."}},"schemas":{"RecipientList":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"total_contacts":{"type":"integer","description":"Number of contacts imported into the list so far."}}},"ApiError":{"type":"object","description":"Error body returned by the `/api/...` endpoints.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"statusCode":{"type":"integer"},"error":{"type":"object","properties":{"message":{"type":"string"}}},"correlationId":{"type":"string","description":"Request ID. Include it when contacting Cekat support."}}},"RateLimitError":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ApiUnauthorized":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Wait and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"ServiceUnavailable":{"description":"A dependency is temporarily unavailable. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"paths":{"/api/recipients":{"post":{"tags":["Broadcast"],"operationId":"UploadRecipientList","summary":"Upload a recipient list","description":"Creates a recipient list from a CSV or XLSX file, for use in campaigns.\n\n**File format**\n- The first row must be headers and include `phone_number` and `name`. Other columns are saved as extra recipient data.\n- Up to 5,000 contacts, 100 columns and 10 MB. Only the first worksheet is read.\n- Phone numbers: non-digits are removed and a leading `0` becomes `62`. Rows with fewer than 7 digits are skipped, and duplicate numbers are kept once.\n\nContacts are imported in the background. Poll `GET /api/recipients` until `total_contacts` for the list matches the `total_contacts` returned here before creating a campaign.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["name","file"],"properties":{"name":{"type":"string","description":"Name of the recipient list."},"file":{"type":"string","format":"binary","description":"CSV or XLSX file (`.csv` or `.xlsx`)."}}}}}},"responses":{"201":{"description":"List created; contacts are being imported.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/RecipientList"}}}}}},"401":{"$ref":"#/components/responses/ApiUnauthorized"},"413":{"description":"The file is larger than 10 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"The name or file is missing, or the file is invalid (wrong type, missing headers, no valid contacts, or too many rows or columns).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```
