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

# Get Tags

> Retrieves a paginated list of tags for the workspace. Supports full-text search and filtering by the creator.

Use this endpoint to fetch all tags available in your workspace. You can use these tag IDs when creating or updating a contact to categorize them.


## OpenAPI

````yaml GET /api/tags
openapi: 3.1.0
info:
  title: Automate Chats API
  description: >-
    API for managing WhatsApp template messages, contacts, custom fields, tags,
    and external integrations.
  version: 1.0.0
servers:
  - url: https://api.automatechats.com
security:
  - apiKeyAuth: []
paths:
  /api/tags:
    get:
      summary: Get Tags
      description: >-
        Retrieves a paginated list of tags for the workspace. Supports full-text
        search and filtering by the creator.
      parameters:
        - name: page
          in: query
          description: 'Page number for pagination (min: 1)'
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          description: 'Number of tags per page (min: 1, max: 100)'
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: search
          in: query
          description: Search term to filter tags by name
          required: false
          schema:
            type: string
        - name: createdBy
          in: query
          description: Filter tags by the ID of the user who created them
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Tags retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ContactTag'
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        example: 1
                      limit:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 42
                      totalPages:
                        type: integer
                        example: 5
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  schemas:
    ContactTag:
      type: object
      properties:
        tagId:
          type: string
          description: Unique ID of the tag
          example: 65e0bc51c12e4d70834b070e
        name:
          type: string
          description: Friendly tag name
          example: VIP
        text_color:
          type: string
          description: Hex text color code
          example: '#ffffff'
        background_color:
          type: string
          description: Hex background color code
          example: '#ef4444'
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        code:
          type: integer
          example: 400
        message:
          type: string
          example: 'Invalid input: field first_name is required.'
        error:
          description: Optional validation error details or raw stack traces.
        timestamp:
          type: string
          format: date-time
          example: '2026-05-18T15:00:00.000Z'
  responses:
    UnauthorizedError:
      description: Unauthorized (missing or invalid API key / JWT token)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: 401
            message: >-
              Unauthorized access: Invalid or missing authentication
              credentials.
            timestamp: '2026-05-18T15:00:00.000Z'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````