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

# Get CRM Schema

> Get the contact schema of the connected CRM: the fields available on its contact object, which are the values that sync mappings can reference.



## OpenAPI

````yaml openapi-final get /get-crm-schema
openapi: 3.0.3
info:
  title: Retell SDK
  version: 3.0.0
  x-retell-spec-revision: 2026-08-22-7679759
  contact:
    name: Retell Support
    url: https://www.retellai.com/
    email: support@retellai.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.retellai.com
    description: The production server.
security:
  - api_key: []
paths:
  /get-crm-schema:
    get:
      description: >-
        Get the contact schema of the connected CRM: the fields available on its
        contact object, which are the values that sync mappings can reference.
      operationId: getCrmSchema
      parameters:
        - in: query
          name: app_id
          schema:
            type: string
          description: >-
            ID of the CRM app to read the schema from. Defaults to the app
            linked in the organization's CRM configuration. Naming a different
            app additionally requires the App.Read scope.
      responses:
        '200':
          description: CRM contact schema.
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    type: string
                    description: CRM provider name.
                  fields:
                    type: array
                    items:
                      $ref: '#/components/schemas/CRMCustomFieldSchema'
                required:
                  - provider
                  - fields
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Retell from 'retell-sdk';

            const client = new Retell({
              apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.crm.getSchema();

            console.log(response.provider);
        - lang: Python
          source: |-
            import os
            from retell import Retell

            client = Retell(
                api_key=os.environ.get("RETELL_API_KEY"),  # This is the default and can be omitted
            )
            response = client.crm.get_schema()
            print(response.provider)
components:
  schemas:
    CRMCustomFieldSchema:
      type: object
      properties:
        name:
          type: string
        label:
          type: string
          description: Display label for the field.
        description:
          type: string
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - date
            - datetime
            - enum
        options:
          type: array
          items:
            type: string
          description: >-
            Allowed values. Required when `type` is `enum`, where a value is
            rejected unless it appears here; ignored for every other type.
      required:
        - name
        - type
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Invalid request format, please check API reference.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: API key is missing or invalid.
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Forbidden
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: The requested resource was not found.
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Account rate limited, please throttle your requests.
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: An unexpected server error occurred.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: string
      description: >-
        Authentication header containing API key (find it in dashboard). The
        format is "Bearer YOUR_API_KEY"

````