> ## 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.

# Get a custom field definition



## OpenAPI

````yaml /openapi.json get /api/v1/custom-fields/{id}/
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/custom-fields/{id}/:
    get:
      tags:
        - Custom Fields
      summary: Get a custom field definition
      operationId: getCustomFieldDefinition
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldDefinition'
          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 — insufficient scope (requires contact.view) or workspace
            trial expired
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '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:
    CustomFieldDefinition:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 100
          pattern: ^[-a-zA-Z0-9_]+$
        label:
          type: string
          maxLength: 255
        field_type:
          $ref: '#/components/schemas/FieldTypeEnum'
        applies_to:
          $ref: '#/components/schemas/AppliesToEnum'
        options: {}
        position:
          type: integer
          maximum: 2147483647
          minimum: 0
        created_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - field_type
        - id
        - label
        - name
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
      required:
        - error
    FieldTypeEnum:
      enum:
        - text
        - number
        - boolean
        - date
        - select
        - multi_select
      type: string
      description: |-
        * `text` - Text
        * `number` - Number
        * `boolean` - Boolean
        * `date` - Date
        * `select` - Select
        * `multi_select` - Multi-select
    AppliesToEnum:
      enum:
        - contact
        - conversation
        - both
      type: string
      description: |-
        * `contact` - Contact
        * `conversation` - Conversation
        * `both` - Both
  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.

````