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

# List custom attribute definitions



## OpenAPI

````yaml /api-reference/support-openapi.json get /api/custom-attributes/definitions/list
openapi: 3.1.0
info:
  title: Clarity Support API
  version: '1.0'
  description: Tickets, customers, messages, the knowledge base, and webhooks.
servers:
  - url: https://back.leap.onclarity.com
security:
  - organizationApiKey: []
tags:
  - name: AI service
    description: >-
      Hand a customer conversation to your Clarity AI agent from your own app or
      backend.
  - name: Messages
    description: Reply to customers on their ticket's channel and add private notes.
  - name: Customers
    description: Create, update, and look up customers and their custom attributes.
  - name: Tickets
    description: >-
      Change a ticket's status, assignee, category, and tags, and list the
      values they take.
  - name: Knowledge base
    description: Manage the articles your AI agents answer from.
  - name: Webhooks
    description: Subscribe your endpoints to events in your organization.
paths:
  /api/custom-attributes/definitions/list:
    get:
      tags:
        - Customers
      summary: List custom attribute definitions
      operationId: ApiCustomAttributesDefinitionsListListDefinitions
      parameters:
        - name: object_type
          in: query
          schema:
            type: string
          required: true
          deprecated: false
          allowEmptyValue: false
          allowReserved: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomAttributeListPayload'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KTSErrorResponse'
        '500':
          description: Server got itself in trouble
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KTSErrorResponse'
      deprecated: false
components:
  schemas:
    CustomAttributeListPayload:
      properties:
        list:
          items:
            $ref: '#/components/schemas/CustomAttributeDefinition'
          type: array
        total:
          type: integer
      type: object
      required:
        - list
        - total
      title: CustomAttributeListPayload
    KTSErrorResponse:
      properties:
        status:
          type: string
          default: error
        code:
          type: string
        message:
          oneOf:
            - type: string
            - type: 'null'
        extra:
          oneOf:
            - additionalProperties: {}
              type: object
            - items: {}
              type: array
            - type: 'null'
      type: object
      required:
        - code
      title: KTSErrorResponse
    CustomAttributeDefinition:
      properties:
        id:
          type: integer
        object_type:
          $ref: '#/components/schemas/CustomAttributeObjectType'
        key:
          type: string
        label:
          type: string
        description:
          oneOf:
            - type: string
            - type: 'null'
        type:
          $ref: '#/components/schemas/CustomAttributeType'
        options:
          items:
            $ref: '#/components/schemas/CustomAttributeOption'
          type: array
        validation:
          $ref: '#/components/schemas/CustomAttributeValidation'
        required:
          type: boolean
        ai_context:
          type: boolean
        code_context:
          type: boolean
        hidden:
          type: boolean
        default_value:
          oneOf:
            - {}
            - type: 'null'
        position:
          type: integer
        created_by:
          oneOf:
            - $ref: '#/components/schemas/CustomAttributeCreatedBy'
            - type: 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      type: object
      required:
        - ai_context
        - code_context
        - created_at
        - hidden
        - id
        - key
        - label
        - object_type
        - options
        - position
        - required
        - type
        - updated_at
        - validation
      title: CustomAttributeDefinition
    CustomAttributeObjectType:
      type: string
      enum:
        - ticket
        - contact
      title: CustomAttributeObjectType
    CustomAttributeType:
      type: string
      enum:
        - text
        - multiline
        - number
        - decimal
        - boolean
        - date
        - datetime
        - list
      title: CustomAttributeType
      description: >
        Admin-configurable custom field types.


        ``list`` is a single option-picker type (not split into
        list/multiselect):

        the definition's ``options`` array holds the choices, and

        ``validation.max_selections`` bounds how many can be picked at once

        (unset/1 behaves like a single-select, >1 like a multi-select). The

        value is always stored as a list of selected option ids.
    CustomAttributeOption:
      properties:
        id:
          type: string
        label:
          type: string
        position:
          type: integer
        archived:
          type: boolean
          default: false
      type: object
      required:
        - id
        - label
        - position
      title: CustomAttributeOption
    CustomAttributeValidation:
      properties:
        max_length:
          oneOf:
            - type: integer
            - type: 'null'
        pattern:
          oneOf:
            - type: string
            - type: 'null'
        pattern_error_message:
          oneOf:
            - type: string
            - type: 'null'
        min:
          oneOf:
            - type: number
            - type: 'null'
        max:
          oneOf:
            - type: number
            - type: 'null'
        min_date:
          oneOf:
            - type: string
            - type: 'null'
        max_date:
          oneOf:
            - type: string
            - type: 'null'
        min_date_time:
          oneOf:
            - type: string
            - type: 'null'
        max_date_time:
          oneOf:
            - type: string
            - type: 'null'
        max_selections:
          oneOf:
            - type: integer
            - type: 'null'
      type: object
      required: []
      title: CustomAttributeValidation
    CustomAttributeCreatedBy:
      properties:
        id:
          type: integer
        name:
          type: string
        avatar_url:
          oneOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - id
        - name
      title: CustomAttributeCreatedBy
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: >-
        Your organization API key (it starts with `anek_org_`). The same key
        works on the Voice API and the Support API. See
        [Authentication](/authentication).

````

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