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

# Get CRM Entity Schema

> Discover the valid fields/properties on a CRM entity (account, contact, lead, or opportunity) in the connected CRM (Salesforce or HubSpot). Introspect the schema first, then fetch fields by their real API names instead of guessing.



## OpenAPI

````yaml get /api/v2/crm/get-entity-schema
openapi: 3.0.0
info:
  version: 1.0.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/crm/get-entity-schema:
    get:
      tags:
        - CRM
      summary: Get CRM Entity Schema
      description: >-
        Discover the valid fields/properties on a CRM entity (account, contact,
        lead, or opportunity) in the connected CRM (Salesforce or HubSpot).
        Introspect the schema first, then fetch fields by their real API names
        instead of guessing.
      operationId: getEntitySchema
      parameters:
        - schema:
            type: string
            enum:
              - account
              - contact
              - lead
              - opportunity
            description: >-
              CRM entity to introspect: account, contact, lead, or opportunity.
              Note: HubSpot does not support leads.
          required: true
          description: >-
            CRM entity to introspect: account, contact, lead, or opportunity.
            Note: HubSpot does not support leads.
          name: entityType
          in: query
        - schema:
            type: string
            description: >-
              Optional case-insensitive filter. Only fields whose API name,
              label, or description contains this substring are returned. Useful
              for locating a known field (e.g. 'qualification') without scanning
              the full property list.
          required: false
          description: >-
            Optional case-insensitive filter. Only fields whose API name, label,
            or description contains this substring are returned. Useful for
            locating a known field (e.g. 'qualification') without scanning the
            full property list.
          name: search
          in: query
      responses:
        '200':
          description: Valid fields/properties for the CRM entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      provider:
                        type: string
                        description: Connected CRM provider (salesforce, hubspot) or 'none'
                      entityType:
                        type: string
                        enum:
                          - account
                          - contact
                          - lead
                          - opportunity
                      objectType:
                        type: string
                        nullable: true
                        description: >-
                          Provider-specific object name (e.g.
                          'contacts'/'companies' for HubSpot,
                          'Contact'/'Account' for Salesforce), or null when
                          unsupported
                      supported:
                        type: boolean
                        description: >-
                          Whether this entity type is supported by the connected
                          provider (e.g. HubSpot has no leads)
                      fields:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: >-
                                CRM API field/property name — the value to pass
                                to additionalFields (e.g.
                                'qualification_rationale', 'Competitor__c')
                            label:
                              type: string
                              description: Human-readable field label
                            description:
                              type: string
                              nullable: true
                              description: >-
                                Field description / help text, when the CRM
                                provides one
                            type:
                              type: string
                              description: >-
                                CRM data type (e.g. 'string', 'number',
                                'enumeration', 'datetime', 'bool')
                            custom:
                              type: boolean
                              description: >-
                                True for a custom (workspace-defined) field,
                                false for a standard CRM field
                            modifiable:
                              type: boolean
                              description: >-
                                Whether the field can be written/updated.
                                Read-only fields are still readable via
                                additionalFields
                            options:
                              type: array
                              items:
                                type: object
                                properties:
                                  label:
                                    type: string
                                    description: Human-readable option label
                                  value:
                                    type: string
                                    description: Underlying option value stored in the CRM
                                required:
                                  - label
                                  - value
                              description: >-
                                Allowed values for picklist / enumeration
                                fields, when applicable
                          required:
                            - name
                            - label
                            - type
                            - custom
                            - modifiable
                        description: Valid fields on the entity, sorted by label
                      total:
                        type: number
                        description: Number of fields returned
                    required:
                      - provider
                      - entityType
                      - objectType
                      - supported
                      - fields
                      - total
                required:
                  - data
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````