> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/crm-connections/openapi.json](/docs/api/crm-connections/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# CRM connections: Preview a CRM sync

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

One endpoint of [CRM connections](/docs/api/crm-connections.md). Authentication, workspaces and errors: [/docs.md](/docs.md).

## Preview a CRM sync

`GET /v1/crm-connections/{connectionId}/preview` - operationId `crm-connections.preview`

| Permission | Rate limit |
| --- | --- |
| Accounts view | 12,000 requests a minute per API key |

Shows what turning sync on would do, without writing anything. Call it after the first import and before you turn
on sync objects.

The preview counts the CRM records the import read and the ones it linked to Kenso records. It counts the CRM
records Kenso would create now under `createRecordsWhen`, and the CRM field values Kenso would change on
records that already exist, with samples. It also lists the CRM users who match no workspace member by email.
It reads only data Kenso holds and makes no call to the CRM.

Errors:

- `404 not_found`: the workspace has no connection with this id.
- `409 import_pending`: the first import has not finished yet.
- `409 invalid_state`: the connection is disconnected.

Requires Accounts view.

Needs the `ingestion` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/crm-sync/GET/v1/crm-connections/%7BconnectionId%7D/preview)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `connectionId` | path | integer (int64) | yes | The CRM connection's id. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a `CrmPreview`.

| Field | Type | Description |
| --- | --- | --- |
| `matched` | CrmObjectCounts | CRM records the import linked to a Kenso record, by object. |
| `read` | CrmObjectCounts | CRM records the import read, by object. |
| `wouldCreate` | CrmWouldCreate | CRM records Kenso would create now under the connection's `createRecordsWhen` setting. |
| `fieldUpdates` | CrmFieldUpdates | CRM field values Kenso would change on records that already exist in the CRM. |
| `unmatchedOwners` | array of CrmUnmatchedOwner | CRM users whose email matches no member, at most 50. |
| `importCompletedAt` | string (date-time) | When the import the preview reads finished, in UTC. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/crm-connections/812/preview" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": {
    "matched": {
      "companies": 1,
      "contacts": 1,
      "deals": 1,
      "owners": 1
    },
    "read": {
      "companies": 1,
      "contacts": 1,
      "deals": 1,
      "owners": 1
    },
    "wouldCreate": {
      "contacts": 1,
      "companies": 1,
      "createRecordsWhen": "string",
      "complete": true,
      "excludedLibraryContacts": 1
    },
    "fieldUpdates": {
      "count": 1,
      "recordsChecked": 1,
      "complete": true,
      "samples": [
        {
          "entityRef": "account:1042",
          "objectType": "company",
          "crmField": "string",
          "kenField": "string",
          "from": "string",
          "to": "string"
        }
      ]
    },
    "unmatchedOwners": [
      {
        "externalId": "string",
        "email": "jane@example.com",
        "name": "string"
      }
    ],
    "importCompletedAt": "2026-09-23T15:02:11Z"
  }
}
```

## Types

Each named type the tables above use, nested ones included.

### CrmObjectCounts

Counts of CRM records by object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `companies` | integer (int32) | no | Companies. |
| `contacts` | integer (int32) | no | Contacts, including leads. |
| `deals` | integer (int32) | no | Deals. |
| `owners` | integer (int32) | no | CRM users. |

### CrmWouldCreate

CRM records Kenso would create now under the connection's `createRecordsWhen` setting.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contacts` | integer (int32) | no | Contacts Kenso would create. |
| `companies` | integer (int32) | no | Companies Kenso would create. Always 0 for a CRM without the `companies` capability, and for Salesforce unless `salesforcePersonMode` is `contact`. |
| `createRecordsWhen` | string | no | The `createRecordsWhen` setting the counts use. |
| `complete` | boolean | no | True when the counts are exact. False when counting stopped at its cap. |
| `excludedLibraryContacts` | integer (int32) | no | Contacts the rule picked that Kenso leaves out because they came only from a Kenso library list. Kenso never sends library contacts to a CRM in bulk. |

### CrmFieldUpdates

CRM field values Kenso would change on records that already exist in the CRM.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `count` | integer (int32) | no | Field values Kenso would change across the records checked. |
| `recordsChecked` | integer (int32) | no | Linked records checked, at most 300 each for companies, contacts and deals. |
| `complete` | boolean | no | True when every linked record was checked. False when the cap left some out. |
| `samples` | array of CrmFieldUpdateSample | no | Up to 10 of the changes, as examples. |

### CrmUnmatchedOwner

A CRM user whose email matches no member.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `externalId` | string | no | The CRM user's id. |
| `email` | string | no | The CRM user's email. Omitted when the CRM gives none. |
| `name` | string | no | The CRM user's name. Omitted when the CRM gives none. |

### CrmFieldUpdateSample

One CRM field value Kenso would change.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entityRef` | string | no | The Kenso record, such as `account:1042` or `person:88231`. |
| `objectType` | string | no | The CRM object: `company`, `contact` or `deal`. |
| `crmField` | string | no | The CRM field's API name. |
| `kenField` | string | no | The Kenso field mapped to the CRM field. Omitted when no mapping names it. |
| `from` | string | no | The CRM's current value. Omitted when the CRM holds none. |
| `to` | string | no | The value Kenso would write. Omitted when Kenso would clear the field. |
