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

# List topics

> Lists the topics this token can use. An account token lists every topic of the account.
A subaccount token lists only its own topics: a producer subaccount can write to them, a
consumer subaccount can read them.




## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/topics
openapi: 3.1.0
info:
  title: Link4Sync Public API
  version: 1.0.0
  summary: Manage your topics from code.
  description: >
    The Link4Sync Public API lets your services list, create, and delete topics.


    Messages do not go through this API. Publish to a topic's HTTPS, HTTP, or
    MQTT connection,

    and read by subscribing to `<topic ID>/out` over MQTT.


    Every request needs a Keycloak access token in the `Authorization: Bearer
    <token>` header.

    Two kinds of token are accepted:


    - **Account token**: issued by the `kafka-connect-access` client for your
    Link4Sync login.
      It can manage every topic of your account.
    - **Subaccount token**: issued with client credentials for an OAuth
    subaccount. It can list
      the topics of that subaccount.
  contact:
    email: support@link4sync.com
servers:
  - url: https://api.link4sync.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Topics
    description: List, create, and delete topics.
paths:
  /v1/topics:
    get:
      tags:
        - Topics
      summary: List topics
      description: >
        Lists the topics this token can use. An account token lists every topic
        of the account.

        A subaccount token lists only its own topics: a producer subaccount can
        write to them, a

        consumer subaccount can read them.
      operationId: listTopics
      responses:
        '200':
          description: The topics this token can use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopicList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    TopicList:
      type: object
      additionalProperties: false
      required:
        - topics
      properties:
        topics:
          type: array
          items:
            $ref: '#/components/schemas/Topic'
    Topic:
      type: object
      additionalProperties: false
      required:
        - name
        - access
      properties:
        name:
          $ref: '#/components/schemas/TopicName'
        access:
          type: array
          description: >
            What this token may do with the topic's messages through its
            connections: `write`

            means publish, `read` means subscribe to `<topic ID>/out`.
          items:
            type: string
            enum:
              - read
              - write
          uniqueItems: true
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: string
          description: A short description of the problem.
    TopicName:
      type: string
      description: >-
        Lowercase letters, digits, and hyphens; starts and ends with a letter or
        digit.
      minLength: 1
      maxLength: 201
      pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
      examples:
        - orders
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The access token is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        This token may not do this, or the account must first accept the current
        terms.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too many requests. Wait the number of seconds in `Retry-After`.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadGateway:
      description: The platform could not complete the request. Retry later.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: The service is temporarily unavailable. Retry later.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        A Keycloak access token: an account token from the
        `kafka-connect-access` client, or a

        subaccount token from client credentials. Tokens are short-lived;
        request a new one when

        you get `401`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.