---
title: "Add a brand document"
description: "Add a document to the brand's library: a file kind takes file_id (Create a file, purpose sms_document), business_number takes text. `POST /api/v1/sms/brands/{id}/documents`"
url: https://www.unitpost.com/docs/sms/post-sms-brands-id-documents
section: "SMS API reference"
updated: 2026-11-11
---
# Add a brand document

`POST /api/v1/sms/brands/{id}/documents`

Add a document to the brand's library: a file kind takes `file_id` ([Create a file](https://www.unitpost.com/docs/platform/post-files), purpose `sms_document`), `business_number` takes `text`. A document in an occupied slot replaces the current one (kept only while a registration under review sent it). `country` makes it one country's own version of a shared document. The same checks as the dashboard (the slot's own file rule, a brand that isn't archived). Send an `Idempotency-Key` so a retry adds one document. Requires the `sms:manage` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | — |
| `Idempotency-Key` | header | string | no | Any unique string (1–256 characters, e.g. a UUID). Retrying with the same key and the same body within 24 hours returns the first result instead of sending again; the same key with a different body is `409 invalid_idempotent_request`, and one still in flight is `409 concurrent_idempotent_requests`. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | enum | yes | The document slot. File kinds: `registration_certificate`, `letter_of_authorization`, `proof_of_sender_id_connection`, `signatory_id`, `emirates_id`, `signatory_passport`, `establishment_card`, `power_of_attorney`, `business_license`, `tax_document`, `regulatory_license`, `carrier_registration_form`, `opt_in_screenshot`. Text kinds: `business_number`. A document in an occupied slot replaces the current one (the old one is kept only while a registration under review pinned it). One of: `registration_certificate`, `letter_of_authorization`, `proof_of_sender_id_connection`, `signatory_id`, `emirates_id`, `signatory_passport`, `establishment_card`, `power_of_attorney`, `business_license`, `tax_document`, `regulatory_license`, `carrier_registration_form`, `opt_in_screenshot`, `business_number`. |
| `carrier` | string | no | The slot's variant, for documents addressed to one carrier (a letter of authorization for `ooredoo`). A Sender ID refusal names it. |
| `country` | string | no | Make this one country's own version of a shared document (ADR-0115): it goes to that country only. Refused for a slot only one country reads. |
| `file_id` | string | no | A file kind: a file made with `POST /files`, purpose `sms_document` (PDF, PNG or JPEG, up to 3 MB; a slot can take less, e.g. Singapore's letter is a PNG up to 400 KB) or `sms_opt_in_evidence` for `opt_in_screenshot`. |
| `text` | string | no | A text kind (`business_number`). |

## Response fields (201)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `id` | string | yes | — |
| `brand_id` | string | yes | — |
| `kind` | enum | yes | One of: `registration_certificate`, `letter_of_authorization`, `proof_of_sender_id_connection`, `signatory_id`, `emirates_id`, `signatory_passport`, `establishment_card`, `power_of_attorney`, `business_license`, `tax_document`, `regulatory_license`, `carrier_registration_form`, `opt_in_screenshot`, `business_number`. |
| `carrier` | string \| null | yes | The slot's variant: which carrier or form a letter is addressed to (e.g. `ooredoo`), or null. |
| `country` | string \| null | yes | Set when this is one country's own version of a shared document (ADR-0115): it goes to that country only, in place of the shared file. Null for the shared file. |
| `label` | string | yes | What the document is, in words: "Letter of authorization — Ooredoo (Qatar)". |
| `input` | enum | yes | One of: `file`, `text`. |
| `filename` | string \| null | yes | — |
| `content_type` | string \| null | yes | — |
| `size_bytes` | integer \| null | yes | — |
| `text_value` | string \| null | yes | `business_number` only. |
| `created_at` | string | yes | — |

## Responses

| Status | Description |
| --- | --- |
| 201 | The document. |
| 400 | The body isn't JSON, or the `Idempotency-Key` is malformed. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope, or SMS isn't on this plan (`limit_reached`). |
| 404 | Brand or file not found, or SMS is not enabled. |
| 409 | The file's bytes haven't been uploaded yet, or the `Idempotency-Key` is in use. |
| 413 | The file is larger than the slot takes. |
| 415 | The file isn't a type the slot takes. |
| 422 | A bad `kind`, `carrier`, `country` (a slot only one country reads), `text`, or a file of another purpose or expired; or an unknown key. |
| 429 | Too many brand writes; retry after the wait. |

## Example request

```bash
curl -X POST 'https://www.unitpost.com/api/v1/sms/brands/sms_123/documents' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
```

## Example response (201)

```json
{
  "object": "sms_brand_document",
  "id": "id_123",
  "brand_id": "brand_123",
  "kind": "registration_certificate",
  "carrier": "string",
  "country": "string",
  "label": "string",
  "input": "file",
  "filename": "string",
  "content_type": "string",
  "size_bytes": 1,
  "text_value": "string",
  "created_at": "2026-01-01T00:00:00.000Z"
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/sms/post-sms-brands-id-documents
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
