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

# List macros



## OpenAPI

````yaml /openapi.json get /api/v1/macros/
openapi: 3.0.3
info:
  title: ChatBridge Public API
  version: 1.0.0
  description: >-
    Customer-facing REST API for ChatBridge — contacts, conversations, messages,
    templates, team, catalogue, tickets, and WhatsApp Flows. Authenticate with a
    workspace API key: `Authorization: Bearer cb_...`. See
    https://github.com/algosmiths/whatschat/blob/main/public_api.md for the full
    scope/versioning reference.
servers:
  - url: https://api.algosmiths.com
    description: Production
security: []
paths:
  /api/v1/macros/:
    get:
      tags:
        - Macros
      summary: List macros
      operationId: listMacros
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Macro'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized — missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden — API key lacks the `macro.view` scope
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests — rate limit exceeded (60 requests/minute per key)
      security:
        - ApiKeyAuth: []
        - tokenAuth: []
        - CookieAuth: []
components:
  schemas:
    Macro:
      type: object
      description: >-
        FUTURE_WORK.md § Macros. Validates the ordered `actions` schema at save
        time

        (whatsapp/macros.py validates the runtime side: existence of the
        referenced

        stage/canned response, pipeline match, 24h window).
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 100
        description:
          type: string
        actions: {}
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - id
        - name
        - updated_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: cb_...
      description: >-
        Workspace API key, e.g. `Authorization: Bearer cb_live_...`. Create one
        in Settings → API Keys. See public_api.md § 3 for scopes.
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
    CookieAuth:
      type: apiKey
      in: cookie
      name: token
      description: Dashboard session cookie — internal use only, not the public contract.

````