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

# CRM Mapping Preview

> Preview which CRM fields a `POST /trigger/crm-sync` will write: the team's resolved contact/company create & update field mappings, the unicity criteria used for matching, and whether creation is enabled. Read-only.



## OpenAPI

````yaml GET /crm/mapping
openapi: 3.1.0
info:
  title: OpenAPI Lonescale
  description: A sample API for Lonescale
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://public-api.lonescale.com
security:
  - ApiKeyAuth: []
paths:
  /crm/mapping:
    get:
      description: >-
        Preview which CRM fields a `POST /trigger/crm-sync` will write: the
        team's resolved contact/company create & update field mappings, the
        unicity criteria used for matching, and whether creation is enabled.
        Read-only.
      parameters:
        - name: crm
          in: query
          required: false
          schema:
            type: string
            enum:
              - hubspot
              - salesforce
              - pipedrive
              - sellsy
          description: Target CRM. Optional when only one CRM has mapping settings.
      responses:
        '200':
          description: Resolved mapping preview
          content:
            application/json:
              schema:
                type: object
                properties:
                  crm:
                    type: string
                  settings_type:
                    type: string
                  contact:
                    type: object
                    properties:
                      create_enabled:
                        type: boolean
                      create_fields:
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            to:
                              type: string
                              nullable: true
                      update_fields:
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            to:
                              type: string
                              nullable: true
                      unicity:
                        type: array
                        items:
                          type: array
                          items:
                            type: string
                  company:
                    type: object
                    properties:
                      create_enabled:
                        type: boolean
                      create_fields:
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            to:
                              type: string
                              nullable: true
                      update_fields:
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            to:
                              type: string
                              nullable: true
        '409':
          description: Several CRMs have mapping settings; pass `crm`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: No CRM mapping settings configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Provide your API key in the x-api-key header.

````