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

# Subscribe to Alert Topic

> Enable receiving alerts for a specific topic to provide granular notification control and better user experience



## OpenAPI

````yaml /openapi/alerts.json post /v2/topics/subscribe
openapi: 3.1.0
info:
  title: Dialect Alerts V2 API
  description: >-
    Notification infrastructure for real-time alert delivery through multiple
    channels including in-app notifications, email, push notifications, and
    Telegram.
  version: 2.2.0-beta
servers:
  - url: https://alerts-api.dial.to
    description: Dialect Production
  - url: https://alerts.dialectapi.to
    description: Dialect Production
security: []
paths:
  /v2/topics/subscribe:
    post:
      tags:
        - Integrate an Inbox
      summary: Subscribe to Alert Topic
      description: >-
        Enable receiving alerts for a specific topic to provide granular
        notification control and better user experience
      operationId: subscribeToTopic
      parameters:
        - name: X-Dialect-Client-Key
          in: header
          required: true
          schema:
            type: string
            description: Client Key used to uniquely identify the client
            example: dk_gyh2eqzfkc4mhp5eiahnndkz
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                topicId:
                  type: string
                  format: uuid
                  description: List of topic IDs to be updated
                  example: 123e4567-e89b-12d3-a456-426614174000
              required:
                - topicId
      responses:
        '201':
          description: Topic preference updated successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Request validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                required:
                  - error
        '401':
          description: Unauthorized
        '403':
          description: >-
            Forbidden. Client not authorized to edit topics of non-whitelisted
            apps
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '422':
          description: Topic not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - subscriber: []
components:
  securitySchemes:
    subscriber:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication for subscriber calls

````