> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifique.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start — Tópicos

> Crie temas de marketing, vincule a templates e filtre audiências por consentimento.

<Tip>
  **Tópico** = assunto que a pessoa aceita receber (Newsletter, Promoções). Diferente de **tag** (etiqueta interna).
</Tip>

## Em poucas palavras

* **Crie** o tópico com nome e **slug** estável.
* **Vincule** ao template de categoria MARKETING.
* **Filtre** segmentos com regra `type: topic`.

Contexto: [Tópicos de comunicação](/contacts-api/como-funciona/topicos-de-comunicacao). Escopos: [Escopos de tópicos](/contacts-api/como-funciona/topicos-escopos-da-api-key).

## Antes de começar

| Item                | Obrigatório       |
| ------------------- | ----------------- |
| **`topics:create`** | Para criar tópico |
| **`topics:read`**   | Para listar       |

Auth: `Authorization: Bearer sk_live_...`. Base URL: `https://api.notifique.dev`.

***

## 1. Pelo painel

1. **Audiência → Tópicos → Novo**
2. Nome (`Newsletter`), **slug** (`newsletter`), descrição para o link de preferências
3. Opt-in padrão para novos contatos (opcional)
4. No **template MARKETING**, associe o tópico correto

***

## 2. Criar tópico (API)

```http theme={null}
POST /v1/topics
Content-Type: application/json
Authorization: Bearer sk_live_xxxxx
```

```json theme={null}
{
  "name": "Newsletter",
  "slug": "newsletter",
  "description": "Novidades e artigos da empresa",
  "defaultOptIn": false
}
```

Resposta **200** — guarde o `id` para segmentos e templates.

<Warning>
  Depois que campanhas dependem do slug, **evite renomear** o slug.
</Warning>

***

## 3. Listar tópicos

```http theme={null}
GET /v1/topics?page=1&limit=50
Authorization: Bearer sk_live_xxxxx
```

***

## 4. Segmento “inscrito no tópico”

```json theme={null}
{
  "version": 1,
  "match": "all",
  "rules": [
    { "type": "topic", "topicId": "clxxTopicNews", "subscribed": true },
    { "type": "receiveMarketing", "value": true }
  ]
}
```

***

## 5. Link de preferências no e-mail

Na ficha do contato, gere o link de preferências. No template use `{{preferences_link}}` — a pessoa escolhe em quais tópicos quer receber.

***

## Próximos passos

* [Campanhas](/contacts-api/como-funciona/campanhas-no-painel)
* [One-click unsubscribe](/emails-api/como-funciona/one-click-unsubscribe-rfc-8058)
* [Introdução](/contacts-api/como-funciona/introducao)
