# Create a broadcast topic

```http
POST https://trydimmi.com/api/v1/broadcast-topics
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `broadcasts:write`.

## Body

- `archived` (boolean): true archives it, false brings it back; the choices people made are kept.
- `consent` (string): opt_in or opt_out. One of: `opt_in`, `opt_out`, ``.
- `description` (string): What people get under it, up to 300 characters.
- `name` (string, required): Name people see, up to 80 characters and unlike the other topics.

## Response 201 (Created)

- `data` (object, required)
  - `broadcast_count` (integer, required): How many broadcasts were sent under this topic.
  - `consent` (string, required): How people join the topic: opt_in reaches only those who said yes, opt_out reaches everyone who has not said no.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `description` (string, required): The text explaining what the topic covers, shown to people choosing their subscriptions. Empty when none was written.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `name` (string, required): The topic's name, such as Product updates.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `subscribed_count` (integer, required): How many people the topic reaches now.
  - `unsubscribed_count` (integer, required): How many people have left this topic.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/broadcast-topics' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "archived": true,
  "consent": "opt_in",
  "description": "<string>",
  "name": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "broadcast_count": 123,
    "consent": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "description": "<string>",
    "id": "<string>",
    "name": "<string>",
    "object": "<string>",
    "subscribed_count": 123,
    "unsubscribed_count": 123
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
