# List topics

`GET /v1/topics`

Requires an API key with the `topics:read` scope. [About keys and scopes](/docs/api/authentication)

Any member, or a key with `topics:read`. Topics let contacts choose what marketing they get, separately from groups. A campaign or journey send step with a `topicId` reaches a contact only if they have email or push consent **and** the topic reaches them: an `opt_out` topic reaches everyone who has not left it, an `opt_in` topic only those who joined. A contact leaves a topic from the unsubscribe link of any message sent on it; every change is recorded in consent history.

## Query parameters

- `limit` (integer, optional, min > 0, max 100, default `20`)
- `cursor` (string, optional, 1–2048 characters)

## Returns

Returns `200 OK`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required, uuid)
- `name` (string, required)
- `description` (string | null, required)
- `mode` (string, required, one of `opt_out`, `opt_in`) — `opt_out` reaches everyone who has not left; `opt_in` only those who joined.
- `createdAt` (string, required, date-time)
- `updatedAt` (string, required, date-time)
- `subscribedCount` (integer, required, min -9007199254740991, max 9007199254740991) — Contacts who joined explicitly: the whole audience of an `opt_in` topic.
- `unsubscribedCount` (integer, required, min -9007199254740991, max 9007199254740991) — Contacts who left explicitly: who an `opt_out` topic no longer reaches.

## Example

```bash
curl https://api.kirora.io/v1/topics \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
      "name": "Weekend specials",
      "description": "description_example",
      "mode": "opt_out",
      "createdAt": "2030-03-14T09:30:00Z",
      "updatedAt": "2030-03-14T09:30:00Z",
      "subscribedCount": -9007199254740991,
      "unsubscribedCount": -9007199254740991
    }
  ],
  "meta": {
    "pagination": {
      "limit": 1,
      "nextCursor": "nextCursor_example"
    }
  }
}
```
