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

# List CRM custom fields

> Returns the CRM fields configured for filtering in your organization, including field type, label, and valid options for enumeration fields. Use this to build `crmCustomFieldFilters` in your requests.



## OpenAPI

````yaml /api/openapi.yaml get /api/public/v1/filters/crm-fields
openapi: 3.1.0
info:
  title: OnePerfectSlice API
  version: 1.0.0
  description: |
    Programmatic access to OnePerfectSlice. Authenticate with a team-scoped
    API key (Bearer sk_...) obtained from Org Settings → API Keys.
servers:
  - url: https://app.oneperfectslice.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /api/public/v1/filters/crm-fields:
    get:
      tags:
        - Filters
      summary: List CRM custom fields
      description: >-
        Returns the CRM fields configured for filtering in your organization,
        including field type, label, and valid options for enumeration fields.
        Use this to build `crmCustomFieldFilters` in your requests.
      operationId: getCrmFields
      responses:
        '200':
          description: Org-scoped CRM field filter configuration
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - fields
                    properties:
                      fields:
                        type: array
                        items:
                          $ref: '#/components/schemas/CrmFieldFilterConfig'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - bearerAuth: []
components:
  schemas:
    CrmFieldFilterConfig:
      type: object
      required:
        - entityType
        - fieldName
        - fieldLabel
        - fieldType
        - isSystem
      properties:
        entityType:
          type: string
          enum:
            - deal
            - company
            - contact
        fieldName:
          type: string
          example: industry
        fieldLabel:
          type: string
          example: Industry
        fieldType:
          type: string
          enum:
            - string
            - number
            - date
            - datetime
            - boolean
            - enumeration
        isSystem:
          type: boolean
          example: false
        options:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/CrmFieldFilterOption'
    CrmFieldFilterOption:
      type: object
      required:
        - label
        - value
      properties:
        label:
          type: string
          example: Law Firm
        value:
          type: string
          example: law_firm
    ApiError:
      type: object
      description: Standard error envelope for all public API error responses
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE error code
              example: INVALID_TOKEN
            message:
              type: string
              description: Human-readable error description
              example: Token is invalid
            details:
              type: object
              description: Optional additional error context
              additionalProperties: true
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingToken:
              value:
                error:
                  code: MISSING_TOKEN
                  message: Authorization header with Bearer token is required
            invalidToken:
              value:
                error:
                  code: INVALID_TOKEN
                  message: Token is invalid
            tokenRevoked:
              value:
                error:
                  code: TOKEN_REVOKED
                  message: Token has been revoked
            tokenExpired:
              value:
                error:
                  code: TOKEN_EXPIRED
                  message: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with sk_ prefix. Create one in Org Settings → API Keys.
      x-default: sk_your_api_key

````