{"openapi":"3.0.4","info":{"title":"Kenso API: CRM connections","version":"1.1","description":"The CRM connections endpoints of the Kenso API, with every component they use. The full spec is https://api.ken.so/v1/docs/openapi.json. Every request sends `Authorization: Bearer <your API key>` and `Ken-Version: 2026-11-02`."},"servers":[{"url":"https://api.ken.so"}],"security":[{"Bearer":[]}],"tags":[{"name":"crm-connections","description":"A CRM connection links your workspace to one CRM: HubSpot, Salesforce, Pipedrive, Attio, Close, HighLevel, Twenty,\nDynamics 365 or Zoho CRM. Connect the CRM here, then choose which objects sync and how Kenso writes to the CRM.\nA workspace has one live connection at a time. Any plan can connect; on the Free plan the connection syncs nothing\nuntil the workspace is on a paid plan. Close and Twenty connect with an API key; every other CRM connects through OAuth\nin a member's browser.","x-displayName":"CRM connections"},{"name":"crm-sync","description":"CRM sync runs a connected CRM: preview what sync would change, start an import, check sync health, handle the\nwrites the CRM refused, and map Kenso fields to CRM fields. It also reads the CRM's own fields, deal pipelines and\nlists, which you need for field mappings and connection settings. Every path starts with a connection id from\n`GET /v1/crm-connections`. Only the fields, pipelines and lists reads call the CRM; the other reads use the\ndata Kenso already imported.","x-displayName":"CRM sync"}],"paths":{"/v1/crm-connections":{"get":{"tags":["crm-connections"],"summary":"List CRM connections","description":"Returns the workspace's live CRM connection, or an empty list when no CRM is connected. A live connection has\nstatus `connected`, `needs_reconnect` or `paused`. A workspace has at most one, so the list holds\none item at most.\n            \nTo read a disconnected connection, call `GET /v1/crm-connections/{connectionId}` with its id.\n            \nRequires Accounts view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.list","parameters":[{"name":"limit","in":"query","description":"Items per page, from 1 to 200. Omit `limit` and `cursor` to get every item in one response, as before; with only `cursor`, 50 per page.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The `nextCursor` of the previous page. Omit it for the first page.","schema":{"type":"string"}},{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionListResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","summary":"Accounts view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}},"post":{"tags":["crm-connections"],"summary":"Connect a CRM","description":"Starts a connection to the CRM named in `provider`. The call must come from a member: a member's session or\nan API key tied to a member.\n            \nFor an OAuth CRM, Kenso answers 200 with `authorizeUrl`. Send the member's browser there. After consent, the\nCRM returns the browser to the Kenso web app, which finishes the connection with\n`POST /v1/crm-connections/oauth/complete`. Dynamics 365 also needs `baseUrl`, your organization URL.\nFor Close or Twenty, send `apiKey`, plus `baseUrl` for a self-hosted Twenty. Kenso checks the key with\nthe CRM and answers 201 with the connection.\nYou can connect the CRM the workspace already uses again, for example after a lost token or a missing scope. The\nsame CRM account keeps its connection.\nAny plan can connect. On the Free plan the connection starts with `status` `paused` and\n`pausedReason` `plan`: it syncs nothing until the workspace is on a paid plan, then it resumes and runs\nits first import.\n            \nErrors:\n            \n- `400 validation_failed`: `provider` is not a supported CRM, `apiKey` or `baseUrl` is missing or the CRM refused it, `baseUrl` is not an https URL, or `returnPath` is not an app path.\n- `403 forbidden`: the API key is not tied to a member.\n- `404 not_found`: this CRM is not available to the workspace.\n- `409 crm_already_connected`: the workspace is connected to another CRM. Disconnect it first.\n- `503 crm_unavailable`: Kenso cannot reach the CRM or start its OAuth flow right now. Try again later.\n            \nRequires Accounts view and the `integrations` permission.\n\nRate limit: 30 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.create","parameters":[{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectCrmBody"}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAuthorizeResponse"}}}},"201":{"description":"Created","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","validation_failed","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"403":{"description":"Forbidden","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["forbidden"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"409":{"description":"Conflict","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["crm_already_connected"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]},"503":{"description":"Service Unavailable","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}},"x-ken-error-codes":["crm_unavailable"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","features":["integrations"],"summary":"Accounts view and the `integrations` permission"},"x-ken-rate-limit":{"limit":30,"windowSeconds":60,"per":"api_key"}}},"/v1/crm-connections/{connectionId}":{"get":{"tags":["crm-connections"],"summary":"Get a CRM connection","description":"Returns one CRM connection in any status, `disconnected` included.\n            \nErrors:\n            \n- `404 not_found`: the workspace has no connection with this id.\n            \nRequires Accounts view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.get","parameters":[{"name":"connectionId","in":"path","description":"The CRM connection's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","summary":"Accounts view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}},"patch":{"tags":["crm-connections"],"summary":"Update a CRM connection","description":"Changes the connection's sync settings and turns sync on or off for each object. Send only the fields to change:\nomitted fields keep their value. `stageMap`, `listSources` and `inboundPeople.filters` replace the\nwhole map or list.\n            \nTurning an object on in `syncObjects` needs a finished first import and CRM writes turned on for the\nworkspace. When contact sync turns on, Kenso starts creating CRM records for every contact that already meets\n`createRecordsWhen`.\nA new `pipelineExternalId` must exist in the CRM. When you pick a new pipeline without a `stageMap`,\nKenso maps its stages to your opportunity stages. `stageMap` values must be opportunity stage keys that are\nnot archived.\n            \nErrors:\n            \n- `400 validation_failed`: a value is out of range, the pipeline or a stage does not exist in the CRM, a campaign is not in the workspace, or the CRM cannot sync the object. `error.details` names each field.\n- `402 plan_required`: the connection is paused for the plan, and the change turns sync on or picks a pipeline.\n- `404 not_found`: the workspace has no connection with this id.\n- `409 import_pending`: the first import has not finished yet.\n- `409 crm_sync_disabled`: writing to the CRM is not on for this workspace yet.\n- `409 needs_reconnect`: the CRM refused Kenso's access. Reconnect the CRM first.\n- `409 invalid_state`: the connection is disconnected.\n- `503 crm_unavailable`: the CRM cannot be reached to check the pipeline. Try again later.\n            \nRequires Accounts view and the `integrations` permission.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.update","parameters":[{"name":"connectionId","in":"path","description":"The CRM connection's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCrmConnectionBody"}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","validation_failed","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"402":{"description":"Payment Required","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["plan_required"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"409":{"description":"Conflict","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["crm_sync_disabled","import_pending","invalid_state","needs_reconnect"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]},"503":{"description":"Service Unavailable","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}},"x-ken-error-codes":["crm_unavailable"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","features":["integrations"],"summary":"Accounts view and the `integrations` permission"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}},"delete":{"tags":["crm-connections"],"summary":"Disconnect a CRM","description":"Disconnects the CRM. Kenso stops every sync, cancels the changes still queued for or from the CRM, and deletes\nits access token. Your Kenso records, the links between Kenso and CRM records, and the data in the CRM stay.\n            \nA connection that is already disconnected also answers 204.\n            \nErrors:\n            \n- `404 not_found`: the workspace has no connection with this id.\n            \nRequires Accounts view and the `integrations` permission.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.delete","parameters":[{"name":"connectionId","in":"path","description":"The CRM connection's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"No Content","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","features":["integrations"],"summary":"Accounts view and the `integrations` permission"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/crm-connections/oauth/complete":{"post":{"tags":["crm-connections"],"summary":"Finish an OAuth connection","description":"Completes an OAuth connection after the member consents in the CRM. The CRM returns the browser to the Kenso web\napp's `/crm/oauth/callback` page, and that page posts what the CRM sent here, signed in as the same member.\n            \nSend `state` exactly as the CRM returned it, with `code`, or with `error` when the member declined.\nSend `X-Ken-Workspace-Id` set to the part of `state` before the first dot.\nOnly the member who started the connection, in the same workspace, can finish it, and only within 10 minutes of\nthe start. Kenso answers any other call with `400 invalid_state` and changes nothing.\nThe response holds the connection, its `provider` and the `returnPath` sent when the connection started.\nOn the Free plan the connection is paused for the plan, as `POST /v1/crm-connections` describes.\n            \nErrors:\n            \n- `400 invalid_state`: the state is missing or expired, or belongs to another member or workspace.\n- `400 provider_error`: the member declined consent in the CRM.\n- `400 exchange_failed`: `code` is missing, or the CRM did not accept it.\n- `409 crm_already_connected`: the workspace connected another CRM in the meantime.\n- `409 crm_account_mismatch`: the member authorized a different CRM account than the connection's. Disconnect first to switch accounts.\n- `503 provider_unavailable`: the CRM is not available to the workspace, or cannot be reached.\n            \nRequires Accounts view and the `integrations` permission.\n\nRate limit: 30 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.complete-oauth","parameters":[{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteCrmOAuthBody"}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOAuthCompletionResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["exchange_failed","invalid_state","provider_error","unsupported_version","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"409":{"description":"Conflict","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["crm_account_mismatch","crm_already_connected"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]},"503":{"description":"Service Unavailable","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}},"x-ken-error-codes":["provider_unavailable"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","features":["integrations"],"summary":"Accounts view and the `integrations` permission"},"x-ken-rate-limit":{"limit":30,"windowSeconds":60,"per":"api_key"}}},"/v1/crm-connections/{connectionId}/preview":{"get":{"tags":["crm-sync"],"summary":"Preview a CRM sync","description":"Shows what turning sync on would do, without writing anything. Call it after the first import and before you turn\non sync objects.\n            \nThe preview counts the CRM records the import read and the ones it linked to Kenso records. It counts the CRM\nrecords Kenso would create now under `createRecordsWhen`, and the CRM field values Kenso would change on\nrecords that already exist, with samples. It also lists the CRM users who match no workspace member by email.\nIt reads only data Kenso holds and makes no call to the CRM.\n            \nErrors:\n            \n- `404 not_found`: the workspace has no connection with this id.\n- `409 import_pending`: the first import has not finished yet.\n- `409 invalid_state`: the connection is disconnected.\n            \nRequires Accounts view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `ingestion` feature on your workspace. Until it is on, calls answer 404.","operationId":"crm-connections.preview","parameters":[{"name":"connectionId","in":"path","description":"The CRM connection's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Ken-Version","in":"header","description":"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.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPreviewResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"409":{"description":"Conflict","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["import_pending","invalid_state"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]}},"x-ken-features":["ingestion"],"x-ken-permission":{"kind":"page","page":"accounts","access":"view","summary":"Accounts view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Enter: Bearer {your Kenso API key}. Create one in the Kenso app under Settings > Integrations > API Keys.","scheme":"bearer","bearerFormat":"Opaque API key"}},"headers":{"RateLimit-Limit":{"description":"The request limit of the rate limit this request is closest to reaching: your plan's limit for this kind of call, your API key's own limit, or the operation's own limit, whichever has the fewest requests left.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The requests left under that limit. `0` on a `429`.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The seconds until that limit resets.","schema":{"type":"integer"}}},"schemas":{"ApiKeyError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A sentence for people that says what went wrong. It can change, so do not parse it."}},"additionalProperties":false,"description":"The body the API key check in front of the operations answered until November 2026, instead of the error body (`Failure`): `{ \"error\": \"Invalid or revoked API key\" }` on a `401`, `{ \"error\": \"Rate limit exceeded\" }` on a `429` and `{ \"error\": \"Authentication is temporarily unavailable\" }` on a `503`. It has no `code`, so branch on the HTTP status."},"CompleteCrmOAuthBody":{"required":["state"],"type":"object","properties":{"code":{"type":"string","description":"The CRM's authorization code. Omit it when `error` is set.","nullable":true},"state":{"type":"string","description":"Required. The `state` value exactly as the CRM returned it, in the form `{workspaceId}.{token}`."},"error":{"type":"string","description":"The CRM's `error` value, sent when the member declined consent. Kenso never returns it.","nullable":true},"errorDescription":{"type":"string","description":"The CRM's `error_description` value. Kenso never returns it.","nullable":true},"accountsServer":{"type":"string","description":"Zoho CRM only: the callback's `accounts-server` value, which names the Zoho data center that issued the code.\nKenso uses it only when it is one of Zoho's accounts servers, and ignores it for every other CRM.","nullable":true}},"additionalProperties":false,"description":"What the CRM sent back to the OAuth callback page."},"ConnectCrmBody":{"required":["provider"],"type":"object","properties":{"provider":{"type":"string","description":"Required. The CRM: `hubspot`, `salesforce`, `pipedrive`, `attio`, `close`,\n`highlevel`, `twenty`, `dynamics` or `zoho`."},"apiKey":{"type":"string","description":"Your CRM API key. Required for Close and Twenty, ignored for the other CRMs. Kenso never logs it.","nullable":true},"baseUrl":{"type":"string","description":"An absolute https URL. For a self-hosted Twenty, its base URL. Required for Dynamics 365: your organization URL,\nsuch as `https://contoso.crm.dynamics.com`.","nullable":true},"returnPath":{"type":"string","description":"An app path to return the member to after OAuth, starting with a single `/`, without spaces, at most 300\ncharacters. `POST /v1/crm-connections/oauth/complete` returns it.","nullable":true},"installSource":{"type":"string","description":"Where the install started: `app` (the default) or `marketplace`, the Install button of the CRM's app\nmarketplace listing. Kenso records it when the OAuth connect creates the connection. An API-key connect records\n`app`, and a reconnect keeps the value the connection already has.","nullable":true}},"additionalProperties":false,"description":"The CRM to connect."},"CrmAuthorize":{"type":"object","properties":{"authorizeUrl":{"type":"string","description":"The CRM's consent page. Send the member's browser here. The CRM then returns the browser to the Kenso web app,\nwhich finishes the connection with `POST /v1/crm-connections/oauth/complete`."}},"additionalProperties":false,"description":"Where to send the member's browser to authorize an OAuth CRM."},"CrmAuthorizeResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/CrmAuthorize"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"CrmConnection":{"type":"object","properties":{"id":{"type":"integer","description":"The connection's id.","format":"int64"},"provider":{"type":"string","description":"The CRM: `hubspot`, `salesforce`, `pipedrive`, `attio`, `close`, `highlevel`,\n`twenty`, `dynamics` or `zoho`."},"status":{"type":"string","description":"The connection state: `connected`, `needs_reconnect` (the CRM refused Kenso's access, so connect it\nagain), `paused` (sync is stopped, see `pausedReason`) or `disconnected`."},"pausedReason":{"type":"string","description":"Why sync is paused: `plan` when the workspace's plan no longer includes CRM sync. Omitted unless the status is `paused`.","nullable":true},"externalAccountName":{"type":"string","description":"The CRM account's name, such as the HubSpot portal or Salesforce organization. Omitted when the CRM gives none.","nullable":true},"instanceUrl":{"type":"string","description":"The CRM instance's base URL, for a CRM that has one per customer. Omitted otherwise.","nullable":true},"connectedAsEmail":{"type":"string","description":"The email of the CRM user Kenso connected as. Kenso reads and writes with that user's access.","nullable":true},"connectedAt":{"type":"string","description":"When the CRM was connected, in UTC.","format":"date-time"},"disconnectedAt":{"type":"string","description":"When the CRM was disconnected, in UTC. Omitted while it is connected.","format":"date-time","nullable":true},"lastImportStartedAt":{"type":"string","description":"When the latest import from the CRM started, in UTC. Omitted before the first import.","format":"date-time","nullable":true},"lastImportCompletedAt":{"type":"string","description":"When the latest import from the CRM finished, in UTC. Omitted until the first import finishes.","format":"date-time","nullable":true},"lastInboundAt":{"type":"string","description":"When Kenso last applied a change read from the CRM, in UTC.","format":"date-time","nullable":true},"lastOutboundAt":{"type":"string","description":"When Kenso last finished a write to the CRM, in UTC.","format":"date-time","nullable":true},"lastError":{"type":"string","description":"The latest connection error, such as why the CRM needs a reconnect. Never a copy of the CRM's response.","nullable":true},"lastErrorAt":{"type":"string","description":"When `lastError` happened, in UTC.","format":"date-time","nullable":true},"syncObjects":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CrmSyncObject"},"description":"The sync switch of each object, always with the six keys `company`, `contact`, `deal`,\n`activity`, `suppression` and `list`."},"settings":{"allOf":[{"$ref":"#/components/schemas/CrmSettings"}],"description":"How Kenso syncs with this CRM."},"capabilities":{"type":"array","items":{"type":"string"},"description":"What this CRM supports: `companies`, `contacts`, `deals`, `owners`, `activity_write`,\n`activity_read`, `lists`, `opt_out_write`, `ken_fields`, `webhooks`, `tasks`,\n`email_activity` and `lifecycles`. A sync object or setting the CRM does not support is refused."}},"additionalProperties":false,"description":"A workspace's connection to one CRM, with its sync settings and the sync switch of each object."},"CrmConnectionListResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"type":"array","items":{"$ref":"#/components/schemas/CrmConnection"},"description":"The items on this page."},"pagination":{"allOf":[{"$ref":"#/components/schemas/Pagination"}],"description":"Where this page ends and how to get the next one."}},"additionalProperties":false,"description":"The body of a successful list operation: one page of results in `data`, and `pagination` to get the next\npage."},"CrmConnectionResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/CrmConnection"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"CrmFieldUpdateSample":{"type":"object","properties":{"entityRef":{"type":"string","description":"The Kenso record, such as `account:1042` or `person:88231`."},"objectType":{"type":"string","description":"The CRM object: `company`, `contact` or `deal`."},"crmField":{"type":"string","description":"The CRM field's API name."},"kenField":{"type":"string","description":"The Kenso field mapped to the CRM field. Omitted when no mapping names it.","nullable":true},"from":{"type":"string","description":"The CRM's current value. Omitted when the CRM holds none.","nullable":true},"to":{"type":"string","description":"The value Kenso would write. Omitted when Kenso would clear the field.","nullable":true}},"additionalProperties":false,"description":"One CRM field value Kenso would change."},"CrmFieldUpdates":{"type":"object","properties":{"count":{"type":"integer","description":"Field values Kenso would change across the records checked.","format":"int32"},"recordsChecked":{"type":"integer","description":"Linked records checked, at most 300 each for companies, contacts and deals.","format":"int32"},"complete":{"type":"boolean","description":"True when every linked record was checked. False when the cap left some out."},"samples":{"type":"array","items":{"$ref":"#/components/schemas/CrmFieldUpdateSample"},"description":"Up to 10 of the changes, as examples."}},"additionalProperties":false,"description":"CRM field values Kenso would change on records that already exist in the CRM."},"CrmInboundPeople":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True when new CRM contacts become people."},"filters":{"type":"array","items":{"$ref":"#/components/schemas/CrmInboundPeopleFilter"},"description":"Filters a new CRM contact must all pass. Empty lets every new contact through."},"leadStatus":{"type":"string","description":"The lead status Kenso sets on a new person that has none: `new` (the default), `working`,\n`qualified`, `disqualified` or `nurture`."},"defaultOwnerMemberId":{"type":"integer","description":"The member who owns a new person when the CRM contact's owner matches no member. Omitted when none is set.","format":"int64","nullable":true},"enabledAt":{"type":"string","description":"When this was turned on, in UTC. Contacts the CRM created earlier never become people. Omitted while it is off.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Whether new CRM contacts become people in Kenso. While it is on, each contact the CRM creates that passes every\nfilter becomes a person."},"CrmInboundPeopleFilter":{"type":"object","properties":{"field":{"type":"string","description":"The CRM field's API name, such as `hs_lead_status` or `lifecyclestage` in HubSpot, or `LeadSource`\nin Salesforce. A field the record lacks reads as blank, so a field only Salesforce Leads have leaves every\nSalesforce Contact out."},"op":{"type":"string","description":"How the field is compared: `equals`, `contains`, `in` or `not_empty`."},"value":{"type":"string","description":"The value to compare, ignoring case. For `in`, a comma-separated list. Omitted for `not_empty`.","nullable":true}},"additionalProperties":false,"description":"One filter a new CRM contact must pass to become a person."},"CrmInboundPeopleFilterBody":{"required":["field","op"],"type":"object","properties":{"field":{"type":"string","description":"Required. The CRM field's API name as the CRM shows it, such as `hs_lead_status` in HubSpot or\n`LeadSource` in Salesforce. At most 255 characters."},"op":{"type":"string","description":"Required. How the field is compared: `equals`, `contains`, `in` or `not_empty`."},"value":{"type":"string","description":"The value to compare, ignoring case, at most 1,000 characters. Required except for `not_empty`. For `in`,\na comma-separated list.","nullable":true}},"additionalProperties":false,"description":"One filter a new CRM contact must pass to become a person."},"CrmListSource":{"type":"object","properties":{"listExternalId":{"type":"string","description":"The CRM list's id, from `GET /v1/crm-connections/{connectionId}/lists`."},"campaignId":{"type":"integer","description":"The campaign the list's members join.","format":"int64"},"keepInSync":{"type":"boolean","description":"True when Kenso keeps reading the list and adds new members as they join. False for a one-time import. Kenso never\nremoves a contact that left the list."}},"additionalProperties":false,"description":"A CRM list whose members Kenso adds to a campaign."},"CrmListSourceBody":{"required":["listExternalId","campaignId"],"type":"object","properties":{"listExternalId":{"type":"string","description":"Required. The CRM list's id, from `GET /v1/crm-connections/{connectionId}/lists`."},"campaignId":{"type":"integer","description":"Required. The campaign in this workspace that the list's members join.","format":"int64"},"keepInSync":{"type":"boolean","description":"True (the default) to keep reading the list and add new members as they join. False for a one-time import. Kenso\nnever removes a contact that left the list.","nullable":true}},"additionalProperties":false,"description":"A CRM list whose members Kenso adds to a campaign."},"CrmOAuthCompletion":{"type":"object","properties":{"provider":{"type":"string","description":"The CRM, such as `hubspot` or `salesforce`."},"returnPath":{"type":"string","description":"The `returnPath` sent with `POST /v1/crm-connections`. Omitted when none was sent.","nullable":true},"connection":{"allOf":[{"$ref":"#/components/schemas/CrmConnection"}],"description":"The CRM connection."}},"additionalProperties":false,"description":"The connection an OAuth flow created or reconnected."},"CrmOAuthCompletionResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/CrmOAuthCompletion"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"CrmObjectCounts":{"type":"object","properties":{"companies":{"type":"integer","description":"Companies.","format":"int32"},"contacts":{"type":"integer","description":"Contacts, including leads.","format":"int32"},"deals":{"type":"integer","description":"Deals.","format":"int32"},"owners":{"type":"integer","description":"CRM users.","format":"int32"}},"additionalProperties":false,"description":"Counts of CRM records by object."},"CrmPreview":{"type":"object","properties":{"matched":{"allOf":[{"$ref":"#/components/schemas/CrmObjectCounts"}],"description":"CRM records the import linked to a Kenso record, by object."},"read":{"allOf":[{"$ref":"#/components/schemas/CrmObjectCounts"}],"description":"CRM records the import read, by object."},"wouldCreate":{"allOf":[{"$ref":"#/components/schemas/CrmWouldCreate"}],"description":"CRM records Kenso would create now under the connection's `createRecordsWhen` setting."},"fieldUpdates":{"allOf":[{"$ref":"#/components/schemas/CrmFieldUpdates"}],"description":"CRM field values Kenso would change on records that already exist in the CRM."},"unmatchedOwners":{"type":"array","items":{"$ref":"#/components/schemas/CrmUnmatchedOwner"},"description":"CRM users whose email matches no member, at most 50."},"importCompletedAt":{"type":"string","description":"When the import the preview reads finished, in UTC.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"What turning CRM sync on would do, worked out from the latest import without writing anything."},"CrmPreviewResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/CrmPreview"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"CrmSettings":{"type":"object","properties":{"createRecordsWhen":{"type":"string","description":"When Kenso creates a CRM record for a campaign contact: `never`, `first_send`, `first_reply` or\n`interested` (the default). HubSpot reads `first_send` as `first_reply`."},"salesforcePersonMode":{"type":"string","description":"Salesforce only. The record Kenso writes for a person: `lead_or_contact` (the default), `lead` or\n`contact`."},"emailLogging":{"type":"string","description":"What Kenso logs on the CRM for each email: `subject_and_body` (the default) or `subject_only`."},"pipelineExternalId":{"type":"string","description":"The CRM deal pipeline Kenso writes deals to. Omitted when none is picked.","nullable":true},"stageMap":{"type":"object","additionalProperties":{"type":"string"},"description":"Maps each CRM stage id of the pipeline to a Kenso opportunity stage key."},"importDaily":{"type":"boolean","description":"When true (the default), each night Kenso adds a Kenso account for every new company in the company lists among\n`listSources`. Needs company sync on."},"skipOpenOpportunities":{"type":"boolean","description":"When true (the default), Kenso holds sends to a contact whose CRM contact or company has an open deal, and checks\nagain each day."},"blockCustomers":{"type":"boolean","description":"When true (the default) and suppression sync is on, Kenso blocks the domains of every company the CRM marks as a\ncustomer."},"pauseOnRepActivityDays":{"type":"integer","description":"Days Kenso holds sends to a contact after a rep worked that contact in the CRM, from 0 to 365. The default is 14.\n0 turns the hold off.","format":"int32"},"staticListPerCampaign":{"type":"boolean","description":"When true, Kenso keeps one static CRM list per campaign with the campaign's contacts. False by default."},"listSources":{"type":"array","items":{"$ref":"#/components/schemas/CrmListSource"},"description":"CRM lists whose members Kenso adds to a campaign. Empty when none."},"inboundPeople":{"allOf":[{"$ref":"#/components/schemas/CrmInboundPeople"}],"description":"Whether new CRM contacts become people in Kenso, and which ones."}},"additionalProperties":false,"description":"How Kenso syncs with a CRM."},"CrmSyncObject":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True when Kenso syncs this object."},"enabledAt":{"type":"string","description":"When sync of this object was last turned on, in UTC. Omitted while it is off.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"The sync switch of one CRM object."},"CrmSyncObjectPatch":{"required":["enabled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Required. True to sync the object, false to stop."}},"additionalProperties":false,"description":"The switch for one sync object."},"CrmUnmatchedOwner":{"type":"object","properties":{"externalId":{"type":"string","description":"The CRM user's id."},"email":{"type":"string","description":"The CRM user's email. Omitted when the CRM gives none.","nullable":true},"name":{"type":"string","description":"The CRM user's name. Omitted when the CRM gives none.","nullable":true}},"additionalProperties":false,"description":"A CRM user whose email matches no member."},"CrmWouldCreate":{"type":"object","properties":{"contacts":{"type":"integer","description":"Contacts Kenso would create.","format":"int32"},"companies":{"type":"integer","description":"Companies Kenso would create. Always 0 for a CRM without the `companies` capability, and for Salesforce unless\n`salesforcePersonMode` is `contact`.","format":"int32"},"createRecordsWhen":{"type":"string","description":"The `createRecordsWhen` setting the counts use."},"complete":{"type":"boolean","description":"True when the counts are exact. False when counting stopped at its cap."},"excludedLibraryContacts":{"type":"integer","description":"Contacts the rule picked that Kenso leaves out because they came only from a Kenso library list. Kenso never sends\nlibrary contacts to a CRM in bulk.","format":"int32"}},"additionalProperties":false,"description":"CRM records Kenso would create now under the connection's `createRecordsWhen` setting."},"ErrorAccount":{"type":"object","properties":{"accountId":{"type":"integer","description":"The account's id.","format":"int64"},"name":{"type":"string","description":"The account's name."},"stakeholderId":{"type":"integer","description":"The person's stakeholder id on this account.","format":"int64"}},"additionalProperties":false,"description":"An account named in an error detail."},"ErrorBody":{"type":"object","properties":{"code":{"type":"string","description":"Stable error code, such as `validation_failed` or `not_found`. Branch on this value."},"message":{"type":"string","description":"A sentence for people that explains the error. It can change, so do not parse it."},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"},"description":"One entry per problem, naming the field or limit it is about. Omitted when there are none.","nullable":true},"requestId":{"type":"string","description":"The id of this request: the same value as the `X-Correlation-Id` response header. Quote it when you write\nto contact@ken.so."},"docUrl":{"type":"string","description":"The page on this code in the developer docs, which says what it means and how to fix it. The errors guide for a\ncode that has no page of its own.","readOnly":true},"refusal":{"allOf":[{"$ref":"#/components/schemas/Refusal"}],"description":"On a `402`, the plan rule or usage limit that refused the request and how to lift it. Omitted otherwise."},"impact":{"allOf":[{"$ref":"#/components/schemas/InvalidationImpact"}],"description":"On a `409` that refuses a change because it would clear stored AI output (a prompt edit, a restore or a\nreset), how much the change would clear. Omitted otherwise."},"surface":{"type":"string","description":"Set only by the voice ticket's `409` (code `voice_conversation_active`): the chat the person's other\nvoice conversation runs in, `support`, `ken` or `onboarding`. Omitted on every other error.","nullable":true}},"additionalProperties":false,"description":"What went wrong in a request."},"ErrorDetail":{"type":"object","properties":{"field":{"type":"string","description":"The request field, header or limit the problem is about, such as `name` or `Ken-Version`."},"code":{"type":"string","description":"Stable code for this problem, such as `required` or `invalid`."},"message":{"type":"string","description":"A sentence for people that explains this problem."},"count":{"type":"integer","description":"On `export_limit_exceeded`, how many rows match the export. Omitted otherwise.","format":"int32","nullable":true},"index":{"type":"integer","description":"The position of the refused item in the request's list. Omitted otherwise.","format":"int32","nullable":true},"limit":{"type":"integer","description":"On `export_limit_exceeded`, the row limit the export ran with. On a `quota_exceeded` detail whose\n`field` names a quota, that quota's limit. On a `rate_limited` detail from your workspace's rate\nlimits, the limit that was hit. Omitted otherwise.","format":"int32","nullable":true},"resetAt":{"type":"string","description":"On some `quota_exceeded` details, when the quota frees up, in UTC. It is the same instant as the top-level\n`quotaResetAt`. On a `rate_limited` detail from your workspace's rate limits, when that limit resets.\nOmitted otherwise.","format":"date-time","nullable":true},"retryAfterSeconds":{"type":"integer","description":"On those `quota_exceeded` details and on most `rate_limited` details, the seconds to wait. It is the\nsame value as the `Retry-After` header. Omitted otherwise.","format":"int32","nullable":true},"inboxId":{"type":"integer","description":"The inbox the problem is about. Omitted otherwise.","format":"int64","nullable":true},"domainId":{"type":"integer","description":"The domain the problem is about. Omitted otherwise.","format":"int64","nullable":true},"domainName":{"type":"string","description":"The name of that domain, or the domain name the request gave. Omitted otherwise.","nullable":true},"accountId":{"type":"integer","description":"On `domain_taken`, `already_stakeholder` and `previously_removed`, the existing account to use\ninstead. Omitted otherwise.","format":"int64","nullable":true},"personId":{"type":"integer","description":"On `email_taken` and `linkedin_url_taken`, the existing person to use instead. Omitted otherwise.","format":"int64","nullable":true},"stakeholderId":{"type":"integer","description":"The account stakeholder the problem is about. Omitted otherwise.","format":"int64","nullable":true},"championId":{"type":"integer","description":"Not used. Always omitted.","format":"int64","nullable":true},"callTaskId":{"type":"integer","description":"On `call_task_exists`, the open call task that already holds the person's slot. Omitted otherwise.","format":"int64","nullable":true},"status":{"type":"string","description":"On `invalid_transition`, the current status. Omitted otherwise.","nullable":true},"allowed":{"type":"array","items":{"type":"string"},"description":"On `out_of_range`, the allowed values. On `invalid_transition`, the statuses the change is allowed\nfrom. Omitted otherwise.","nullable":true},"scope":{"type":"string","description":"On a `permission_denied` for an account owner change, the account scope the call needs (`all`). On\n`sending_paused`, what the pause covers: `inbox`, `domain` or `workspace`. Omitted otherwise.","nullable":true},"removedAt":{"type":"string","description":"On `previously_removed`, when a person removed the stakeholder, in UTC. Omitted otherwise.","format":"date-time","nullable":true},"page":{"type":"string","description":"On `permission_denied`, the page the call needs, such as `campaigns`. Omitted otherwise.","nullable":true},"required":{"type":"string","description":"On `permission_denied`, the access `page` needs: `view` or `edit`. Omitted otherwise.","nullable":true},"feature":{"type":"string","description":"On `permission_denied`, the permission the call needs, such as `launch`. Omitted otherwise.","nullable":true},"runId":{"type":"integer","description":"On `committee_run_active` and `run_not_finding`, the committee run the problem is about. Omitted\notherwise.","format":"int64","nullable":true},"mergedIntoId":{"type":"integer","description":"On `person_merged`, the person the merged person now lives on. On `account_merged`, the account the\nmerged account now lives on. Omitted otherwise.","format":"int64","nullable":true},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/ErrorAccount"},"description":"On `person_on_accounts`, the accounts that block the change. Omitted otherwise.","nullable":true},"stage":{"type":"string","description":"On `stage_in_use` and `system_stage`, the opportunity stage key the problem is about. Omitted otherwise.","nullable":true},"opportunityCount":{"type":"integer","description":"On `stage_in_use`, how many opportunities are in that stage. Omitted otherwise.","format":"int32","nullable":true},"rule":{"type":"string","description":"On `guardrail_violation`, the contact limit rule the change breaks. Omitted otherwise.","nullable":true},"nextAllowedAt":{"type":"string","description":"On `guardrail_violation`, the first `dueAt` that passes every contact limit, in UTC. On a refused\nsend, when to retry. Omitted otherwise, and when waiting does not clear it.","format":"date-time","nullable":true},"fix":{"type":"string","description":"On a refused send, what to do next, in plain words. Omitted otherwise.","nullable":true},"opensAt":{"type":"string","description":"On `outside_calling_hours`, when the person's calling window opens, in UTC. Omitted otherwise.","format":"date-time","nullable":true},"currentVersion":{"type":"integer","description":"On a knowledge file's `version_conflict`, the file's current version. Omitted otherwise.","format":"int32","nullable":true},"provider":{"type":"string","description":"On a CRM connection error (`provider_error`, `exchange_failed`, `already_connected`,\n`account_mismatch` or `provider_unavailable`), the CRM it is about. Omitted otherwise.","nullable":true},"sharedWithMaster":{"type":"boolean","description":"True on a `quota_exceeded` detail when the shared limit of the white-label master workspace was hit, so\n`limit` is the limit of the whole white-label account. Omitted otherwise. The master's id is never sent.","nullable":true},"stepId":{"type":"integer","description":"On `link_reputation_blocked`, the saved sequence step that holds the blocked link. Omitted otherwise, and\nfor a step the save would have created.","format":"int64","nullable":true},"stepOrder":{"type":"integer","description":"On `link_reputation_blocked`, the `stepOrder` of that step. Omitted otherwise.","format":"int32","nullable":true},"url":{"type":"string","description":"On `link_reputation_blocked`, the blocked link as the step's copy writes it. Omitted otherwise.","nullable":true},"key":{"type":"string","description":"On `unfilled_template_key`, the template key the text still holds, such as `first_name` for\n`{first_name}`. Omitted otherwise.","nullable":true},"marker":{"type":"string","description":"On `unfilled_template_key`, that key as the text writes it, such as `{first_name}` or `[company]`.\nOmitted otherwise.","nullable":true},"retryAt":{"type":"string","description":"On a warm path Start's `guardrail_connector_monthly`, `guardrail_account_monthly`,\n`guardrail_connector_cooldown` and `guardrail_handoff_weekly`, when the limit frees up, in UTC. Omitted\notherwise.","format":"date-time","nullable":true},"workspaceId":{"type":"integer","description":"On `last_admin`, a workspace that needs a new admin before the account can be deleted. On\n`new_admin_not_found`, the workspace of the refused choice. Omitted otherwise.","format":"int64","nullable":true},"workspaceName":{"type":"string","description":"On `last_admin`, the name of that workspace. Omitted otherwise.","nullable":true},"class":{"type":"string","description":"On a `rate_limited` detail from your workspace's rate limits, the class of call that hit its limit:\n`read`, `write`, `bulk`, `heavy` or `sensitive`. Omitted otherwise.","nullable":true},"window":{"type":"string","description":"On that detail, the window whose limit was hit: `minute`, `day` or `bulkItemsDay`. Omitted\notherwise.","nullable":true}},"additionalProperties":false,"description":"One problem in an error: the field or limit it is about, a stable `code` and a `message`. The other fields\nappear only with the codes their descriptions name."},"Failure":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false on an error."},"error":{"allOf":[{"$ref":"#/components/schemas/ErrorBody"}],"description":"What went wrong."},"quotaResetAt":{"type":"string","description":"When the quota that refused the request frees up, in UTC. Set on some quota refusals. Omitted otherwise.","format":"date-time","nullable":true},"currentVersion":{"type":"integer","description":"The current revision of a workflow draft, on a draft save's `409 version_conflict`. Read the workflow\nagain, then send this value as `baseVersion`. Omitted otherwise.","format":"int32","nullable":true},"current":{"allOf":[{"$ref":"#/components/schemas/MeetingRepNotesCurrent"}],"description":"Your meeting notes and their version as stored now, on a meeting notes save's `409 version_conflict`.\nMerge your change, then save again with `baseVersion` set to `current.repNotesVersion`. Omitted\notherwise."},"refusal":{"allOf":[{"$ref":"#/components/schemas/Refusal"}],"description":"A copy of `error.refusal`, set on some billing refusals. Omitted otherwise."},"message":{"type":"string","description":"A copy of `error.message`, set together with `refusal`. Omitted otherwise.","nullable":true},"lookalikeSeeds":{"description":"How Kenso read each seed of a lookalike search, on its `422 no_usable_seeds`:\n`{resolved: [{input, companyId, personId, name, domain}], unresolved: [{input, reason}]}`. Use it to show\nwhy no seed was usable. Omitted otherwise."}},"additionalProperties":false,"description":"The body of every error, with a 4xx or 5xx status. Branch on `error.code`."},"InvalidationImpact":{"type":"object","properties":{"qualificationResponses":{"type":"integer","description":"Stored qualification answers the change would clear.","format":"int32"},"qualifiedFlags":{"type":"integer","description":"Contacts whose qualified result the change would clear.","format":"int32"},"segmentationReasoning":{"type":"integer","description":"Stored segmentation explanations the change would clear.","format":"int32"},"segmentationAssignmentsKept":{"type":"integer","description":"Contacts that keep their segment.","format":"int32"},"segmentationAssignmentsReset":{"type":"integer","description":"Contacts that go back to the default segment.","format":"int32"},"personalizationLines":{"type":"integer","description":"Personalized lines the change would clear.","format":"int32"},"personalizationLeads":{"type":"integer","description":"Contacts that would lose their personalized lines.","format":"int32"},"rewritingLines":{"type":"integer","description":"Rewritten lines the change would clear.","format":"int32"},"rewritingLeads":{"type":"integer","description":"Contacts that would lose their rewritten lines.","format":"int32"}},"additionalProperties":false,"description":"How much stored AI output a change would clear in each AI step of a campaign, and how many segment assignments it\nkeeps or resets."},"MeetingRepNotesCurrent":{"type":"object","properties":{"repNotes":{"type":"string","description":"Your notes as stored now. Empty before your first save."},"repNotesVersion":{"type":"integer","description":"The stored notes' version. Send it as `baseVersion` when you save again.","format":"int32"}},"additionalProperties":false,"description":"Your meeting notes as Kenso stores them now, sent with a `409 version_conflict` on a notes save."},"Pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Send this value as `cursor` to get the next page. Omitted on the last page.","nullable":true},"hasMore":{"type":"boolean","description":"True when more items follow this page. Stop paging when it is false."},"total":{"type":"integer","description":"Deprecated: the same number as `totalCount`. Read `totalCount`.","format":"int32","nullable":true,"deprecated":true},"totalCount":{"type":"integer","description":"The number of items that match the list's filters, across all pages. Omitted when the list does not count them.","format":"int32","nullable":true},"isTotalCapped":{"type":"boolean","description":"True when `totalCount` stopped counting at its cap, so more items match than it says. Keep paging with\n`hasMore`. Omitted when `totalCount` is exact. Only `GET /v1/threads` with `q` caps its total.","nullable":true}},"additionalProperties":false,"description":"Where a list page ends and how to get the next page."},"RateLimitedText":{"type":"string","description":"The gateway's plain-text body of a `429` over the operation's own limit, until November 2026: `Number of requests exceeded. Please try again later.`","example":"Number of requests exceeded. Please try again later."},"Refusal":{"type":"object","properties":{"code":{"type":"string","description":"Stable refusal code in upper case, such as `CAMPAIGN_LIMIT_REACHED` or `INSUFFICIENT_CREDITS`."},"metric":{"type":"string","description":"What the limit counts: `Campaigns`, `Leads`, `Emails`, `LinkedInSeats` or `AiCredits`,\n`jobs_export_rows` or `funding_export_rows` for an export allowance, `credit_pack_credits`,\n`credit_spend_usd_7d`, `domains` or `mailboxes` for a limit on a new paying workspace, or for a\nKenso Lifetime cap its key: `workspaces`, `inboxes`, `contacts`, `email_verifications_day`,\n`email_verifications_month`, `people_results_day`, `company_results_day`,\n`funding_results_day`, `job_post_results_day`, `website_visits_month` or\n`visitor_lookups_day`. Omitted when a plan rule, not a count, refused the request.","nullable":true},"used":{"type":"integer","description":"How much of the limit is used, in the unit of `metric`. Omitted when the refusal has no count.","format":"int32","nullable":true},"limit":{"type":"integer","description":"The limit, in the unit of `metric`. Omitted when the refusal has no count.","format":"int32","nullable":true},"remaining":{"type":"integer","description":"How much of the limit is left, in the unit of `metric`. Omitted when the refusal has no count.","format":"int32","nullable":true},"planType":{"type":"string","description":"The workspace's plan as its snake plan id, for example `free`, `legacy_core` or `growth`."},"remedy":{"type":"string","description":"What lifts the refusal: `Upgrade`, `BuyAddOn`, `UpdatePaymentMethod` or `ContactSupport`.\n`None` means no action of yours lifts it."},"unlocksAt":{"type":"string","description":"When the limit lifts by itself, in UTC: for a limit on a new paying workspace once it has paid an invoice, and for\na Kenso Lifetime daily or monthly cap its reset (00:00 UTC, or the 1st of the month). Omitted on every other\nrefusal.","format":"date-time","nullable":true},"requiredMillicredits":{"type":"integer","description":"On a credit refusal, the millicredits the action needed. 1,000 millicredits are one credit. Omitted on every\nother refusal.","format":"int64","nullable":true},"availableMillicredits":{"type":"integer","description":"On a credit refusal, the millicredits available. On `FREE_CREDITS_NOT_ELIGIBLE`, only the credits that may\npay for inboxes and domains. Omitted on every other refusal.","format":"int64","nullable":true},"restrictedMillicredits":{"type":"integer","description":"On `FREE_CREDITS_NOT_ELIGIBLE`, the free and bonus millicredits in the balance that cannot pay for inboxes\nand domains. Omitted on every other refusal.","format":"int64","nullable":true},"feature":{"type":"string","description":"On `PLAN_FEATURE_NOT_AVAILABLE`, the plan feature the plan does not include, in snake case (for example\n`website_visitor_id`). Omitted on every other refusal.","nullable":true},"requiredPlan":{"type":"string","description":"On `PLAN_FEATURE_NOT_AVAILABLE`, the cheapest plan that includes `feature`, in snake case (for example\n`growth`). For a feature the self-serve trial locks (`browser_runs`), the trial's own plan,\nwhich paying for unlocks it. Omitted on every other refusal.","nullable":true},"requiredTier":{"type":"integer","description":"On a Kenso Lifetime refusal, the lowest tier that lifts it: the next tier with a higher cap, or the lowest tier\nthat includes `feature`. Omitted at the top tier, when no tier includes the feature, and on every other\nrefusal.","format":"int32","nullable":true},"upgradeUrl":{"type":"string","description":"On a Kenso Lifetime refusal that a higher tier lifts, the AppSumo page where the buyer upgrades their license.\nOmitted until Kenso has read that page from AppSumo, when no tier lifts the refusal, and on every other refusal.","nullable":true}},"additionalProperties":false,"description":"Why a plan rule or usage limit refused the request, and how to lift it."},"ServiceUnavailableError":{"oneOf":[{"$ref":"#/components/schemas/Failure"},{"$ref":"#/components/schemas/ApiKeyError"}],"description":"The body of a `503`: the error body (`Failure`). When Kenso cannot check the API key, its code is `auth_unavailable`, with `Retry-After: 5`. Until November 2026 the API key check in front of the operations answered `{ \"error\": \"Authentication is temporarily unavailable\" }` (`ApiKeyError`) there instead, so handle both shapes. Retry after the `Retry-After` seconds."},"TooManyRequestsError":{"oneOf":[{"$ref":"#/components/schemas/Failure"},{"$ref":"#/components/schemas/ApiKeyError"}],"description":"The JSON body of a `429`: the error body (`Failure`), with code `rate_limited` or `quota_exceeded`, over your workspace's rate limits, your API key's own limit, the operation's own limit or a usage quota. Until November 2026, over your API key's own limit the API key check answered `{ \"error\": \"Rate limit exceeded\" }` (`ApiKeyError`), and over the operation's own limit the gateway answered plain text (`RateLimitedText`): `Number of requests exceeded. Please try again later.` A client built against those answers keeps working: handle each shape. Wait the `Retry-After` seconds."},"UnauthorizedError":{"oneOf":[{"$ref":"#/components/schemas/Failure"},{"$ref":"#/components/schemas/ApiKeyError"}],"description":"The body of a `401`: the error body (`Failure`), whose `code` says what is wrong with the credential. Until November 2026, when the API key was not valid (unknown, expired or revoked, or its member no longer active), the API key check in front of the operations answered `{ \"error\": \"Invalid or revoked API key\" }` (`ApiKeyError`), and a request with no API key got a `401` that has no body. A client built against those answers keeps working: handle both shapes and a `401` with no body."},"UpdateCrmConnectionBody":{"type":"object","properties":{"settings":{"allOf":[{"$ref":"#/components/schemas/UpdateCrmSettingsBody"}],"description":"The sync settings to change. Omitted settings keep their value."},"syncObjects":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CrmSyncObjectPatch"},"description":"The objects to turn on or off, keyed by `company`, `contact`, `deal`, `activity`,\n`suppression` or `list`. Omitted objects keep their switch. An object the CRM does not support cannot be\nturned on.","nullable":true}},"additionalProperties":false,"description":"The changes to a CRM connection. Omitted fields keep their value."},"UpdateCrmInboundPeopleBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True to turn it on, false to turn it off. Turning it on needs a CRM with the `contacts` capability.","nullable":true},"filters":{"type":"array","items":{"$ref":"#/components/schemas/CrmInboundPeopleFilterBody"},"description":"Replaces the whole list of filters, at most 10. A new CRM contact must pass all of them. An empty list removes every filter.","nullable":true},"leadStatus":{"type":"string","description":"The lead status Kenso sets on a new person that has none: `new`, `working`, `qualified`,\n`disqualified` or `nurture`.","nullable":true},"defaultOwnerMemberId":{"type":"integer","description":"The member who owns a new person when the CRM contact's owner matches no member. Send null to clear it.","format":"int64","nullable":true}},"additionalProperties":false,"description":"The changes to how new CRM contacts become people. Omitted fields keep their value."},"UpdateCrmSettingsBody":{"type":"object","properties":{"createRecordsWhen":{"type":"string","description":"When Kenso creates a CRM record for a campaign contact: `never`, `first_send`, `first_reply` or\n`interested`. HubSpot refuses `first_send`.","nullable":true},"salesforcePersonMode":{"type":"string","description":"Salesforce only. The record Kenso writes for a person: `lead_or_contact`, `lead` or `contact`.","nullable":true},"emailLogging":{"type":"string","description":"What Kenso logs on the CRM for each email: `subject_and_body` or `subject_only`.","nullable":true},"pipelineExternalId":{"type":"string","description":"The CRM deal pipeline Kenso writes deals to, from `GET /v1/crm-connections/{connectionId}/pipelines`. An\nempty string clears the pipeline and the stage map. A new pipeline sent without a `stageMap` gets a default\nmap.","nullable":true},"stageMap":{"type":"object","additionalProperties":{"type":"string"},"description":"Replaces the whole stage map: each CRM stage id of the pipeline to a Kenso opportunity stage key that is not\narchived. A non-empty map needs a pipeline.","nullable":true},"importDaily":{"type":"boolean","description":"When true, each night Kenso adds a Kenso account for every new company in the company lists among `listSources`.","nullable":true},"skipOpenOpportunities":{"type":"boolean","description":"When true, Kenso holds sends to a contact whose CRM contact or company has an open deal.","nullable":true},"blockCustomers":{"type":"boolean","description":"When true and suppression sync is on, Kenso blocks the domains of every company the CRM marks as a customer.","nullable":true},"pauseOnRepActivityDays":{"type":"integer","description":"Days Kenso holds sends to a contact after a rep worked that contact in the CRM, from 0 to 365. 0 turns the hold off.","format":"int32","nullable":true},"staticListPerCampaign":{"type":"boolean","description":"When true, Kenso keeps one static CRM list per campaign. Needs a CRM with the `lists` capability.","nullable":true},"listSources":{"type":"array","items":{"$ref":"#/components/schemas/CrmListSourceBody"},"description":"Replaces the whole list of CRM lists that feed campaigns, at most 50. A non-empty list needs a CRM with the\n`lists` capability. An empty list removes every source.","nullable":true},"inboundPeople":{"allOf":[{"$ref":"#/components/schemas/UpdateCrmInboundPeopleBody"}],"description":"Whether new CRM contacts become people in Kenso, and which ones. Omitted fields keep their value."}},"additionalProperties":false,"description":"The sync settings to change. Omitted settings keep their value."}}}}