> ## 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 Custom Fields

> Retrieves a paginated list of custom fields defined in the workspace. Supports full-text search and filtering by the creator.

Use this endpoint to retrieve all custom fields configured in your workspace. The returned custom field IDs are required when updating a contact's custom data.


## OpenAPI

````yaml GET /api/custom-fields
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/custom-fields:
    get:
      summary: Get Custom Fields
      description: >-
        Retrieves a paginated list of custom fields defined in 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 custom fields 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 custom fields by name
          required: false
          schema:
            type: string
        - name: createdBy
          in: query
          description: Filter custom fields by the ID of the user who created them
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Custom fields retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 65f12ab3c9e4f1a2b3c4d5e6
                        name:
                          type: string
                          example: Company Name
                        type:
                          type: string
                          example: text
                        createdBy:
                          type: string
                          example: 6996aeeedf12574080a99d81
                        createdAt:
                          type: string
                          format: date-time
                          example: '2026-05-18T15:00:00.000Z'
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        example: 1
                      limit:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 25
                      totalPages:
                        type: integer
                        example: 3
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  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'
  schemas:
    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'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````