{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}
{
"message": "Multiple CRMs have mapping settings (hubspot, salesforce); pass \"crm\" to pick one",
"error": "Conflict",
"statusCode": 409
}
{
"message": "No hubspot integration mapping settings found; configure the hubspot integration in LoneScale first",
"error": "Unprocessable Entity",
"statusCode": 422
}
CRM Sync
CRM Sync
Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved.
Record keys must match the LoneScale field keys referenced by your configured mappings (for example lonescale_first_name, lonescale_company_domain, or any custom key you mapped); see Available Fields for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set account_crm_id on a record to target an existing CRM company by id instead of matching by unicity criteria.
Poll GET /trigger/crm-sync/{id} with the returned id, or pass a webhook_url to be called once with the run summary when every record has been processed.
Which team-level settings record to sync with when several exist for the CRM (settings are stored per use-case: api_sync, contact_sourcing, job_changes, ...). When omitted, resolution prefers the dedicated api_sync record (configured in the "API Sync" tab of the CRM integration), then falls back to contact_sourcing, then the only existing record.
Deliver every record to this platform webhook (id from GET /webhooks) instead of a CRM. No CRM connection or mapping is required. Mutually exclusive with crm / settings_type; distinct from webhook_url (the completion callback).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LoneScale API Doc","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/lonescale-5883e47c/WovNkkTIMlsr76Dy/logo/LoneScale-Logo-Preferred.png?fit=max\u0026auto=format\u0026n=WovNkkTIMlsr76Dy\u0026q=85\u0026s=f88739fcb1e0caffbf3f475cbb1af2ad","dark":"https://mintcdn.com/lonescale-5883e47c/-kZ_pqrQp3g0kjGD/logo/LoneScale-Logo-White.png?fit=max\u0026auto=format\u0026n=-kZ_pqrQp3g0kjGD\u0026q=85\u0026s=b67f1dbb75497277639848763ccfade6"},"favicon":"https://mintcdn.com/lonescale-5883e47c/IsnOuhnBDDXY9vur/svglogo.png?fit=max\u0026auto=format\u0026n=IsnOuhnBDDXY9vur\u0026q=85\u0026s=a65527d1f22c97e3b79ac7716f97447f","navbar":{"links":[{"href":"mailto:happy@lonescale.com","label":"Contact Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.lonescale.com"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/lonescale"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://docs.lonescale.com"},{"anchor":"Help Center","icon":"newspaper","href":"https://help-center.lonescale.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lonescale-5883e47c","hasAudioNarration":false,"actualSubdomain":"lonescale-5883e47c","customDomains":["docs.lonescale.com"],"gitSource":{"type":"github","owner":"sanyann","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae8c2c70e678b1f73a1d030","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"API Reference","count":33},{"language":"default","tag":"CLI","count":12},{"language":"default","tag":"Lists","count":7},{"language":"default","tag":"Today's accounts","count":7},{"language":"default","tag":"CRM Sync","count":6},{"language":"default","tag":"API Enrichment","count":6},{"language":"default","tag":"MCP","count":6},{"language":"default","tag":"Webhook Payload","count":3},{"language":"default","tag":"Getting Started","count":2},{"language":"default","tag":"Companies","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/crm-sync","slug":"/api-reference/endpoint/crm-sync","pageMetadata":{"title":"CRM Sync","openapi":"POST /trigger/crm-sync","description":"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved.\n\nRecord keys must match the LoneScale field keys referenced by your configured mappings (for example `lonescale_first_name`, `lonescale_company_domain`, or any custom key you mapped); see [Available Fields](/api-reference/crm-sync-fields) for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set `account_crm_id` on a record to target an existing CRM company by id instead of matching by unicity criteria.\n\nPoll `GET /trigger/crm-sync/{id}` with the returned `id`, or pass a `webhook_url` to be called once with the run summary when every record has been processed.","href":"/api-reference/endpoint/crm-sync"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Record keys must match the LoneScale field keys referenced by your configured mappings (for example \", _jsx(_components.code, {\n children: \"lonescale_first_name\"\n }), \", \", _jsx(_components.code, {\n children: \"lonescale_company_domain\"\n }), \", or any custom key you mapped); see \", _jsx(_components.a, {\n href: \"/api-reference/crm-sync-fields\",\n children: \"Available Fields\"\n }), \" for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set \", _jsx(_components.code, {\n children: \"account_crm_id\"\n }), \" on a record to target an existing CRM company by id instead of matching by unicity criteria.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Poll \", _jsx(_components.code, {\n children: \"GET /trigger/crm-sync/{id}\"\n }), \" with the returned \", _jsx(_components.code, {\n children: \"id\"\n }), \", or pass a \", _jsx(_components.code, {\n children: \"webhook_url\"\n }), \" to be called once with the run summary when every record has been processed.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"CRM Sync","openapi":"POST /trigger/crm-sync","description":"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved.\n\nRecord keys must match the LoneScale field keys referenced by your configured mappings (for example `lonescale_first_name`, `lonescale_company_domain`, or any custom key you mapped); see [Available Fields](/api-reference/crm-sync-fields) for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set `account_crm_id` on a record to target an existing CRM company by id instead of matching by unicity criteria.\n\nPoll `GET /trigger/crm-sync/{id}` with the returned `id`, or pass a `webhook_url` to be called once with the run summary when every record has been processed.","href":"/api-reference/endpoint/crm-sync"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved.\n\nRecord keys must match the LoneScale field keys referenced by your configured mappings (for example `lonescale_first_name`, `lonescale_company_domain`, or any custom key you mapped); see [Available Fields](/api-reference/crm-sync-fields) for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set `account_crm_id` on a record to target an existing CRM company by id instead of matching by unicity criteria.\n\nPoll `GET /trigger/crm-sync/{id}` with the returned `id`, or pass a `webhook_url` to be called once with the run summary when every record has been processed.","requestBody":"2447a95d-3deb-4ea5-96ec-6c51caeb3644","responses":{"201":"cc5f056d-e37f-4be3-a4a4-21992b38c1ae","401":"0fb41dc5-3a69-4152-b1b4-a36b5e2dca0a","409":"0ed91244-cef3-4481-bf6e-eb89cd3f3aa8","422":"633a0d58-c39e-4fb7-b883-d614f33beb63"},"method":"post","type":"path","servers":["70167a7e-c866-4cf8-bba8-144111851d01"],"security":["3fdd0f0e-af82-4d8a-af9c-9a32e34a28d1"],"path":"/trigger/crm-sync","baseUrlOptions":["https://public-api.lonescale.com"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"crm":{"type":"string","enum":["hubspot","salesforce","pipedrive","sellsy"],"description":"Target CRM. Required only when more than one connected CRM has mapping settings.","uniqueKey":"crm","typeLabel":"enum\u003cstring>"},"settings_type":{"type":"string","description":"Which team-level settings record to sync with when several exist for the CRM (settings are stored per use-case: api_sync, contact_sourcing, job_changes, ...). When omitted, resolution prefers the dedicated `api_sync` record (configured in the \"API Sync\" tab of the CRM integration), then falls back to `contact_sourcing`, then the only existing record.","uniqueKey":"settings_type","typeLabel":"string"},"contacts":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":true,"description":"Free-form record: keys must match the LoneScale field keys referenced by the configured mappings. See [Available Fields](/api-reference/crm-sync-fields) for the full list. The `lonescale_` / `main_` prefix is optional: `first_name`, `job_title`, `company_domain`, `email` and `phone` resolve like their prefixed form, and camelCase keys from enrich payloads (`firstName`, `jobTitle`, ...) are aliased too. A record whose keys match none of the mapped or unicity fields is failed, with the expected field keys in the error.","properties":{"account_crm_id":{"type":"string","description":"Optional CRM company id: targets that company directly instead of matching by unicity criteria.","uniqueKey":"contacts.items.[INDEX].account_crm_id","typeLabel":"string"},"contact_crm_id":{"type":"string","description":"Optional CRM contact id (e.g. the id returned by POST /crm/search): updates that exact contact instead of matching by unicity criteria.","uniqueKey":"contacts.items.[INDEX].contact_crm_id","typeLabel":"string"},"owner_id":{"type":"string","description":"Salesforce only. Optional User id (005…) that owns the created or updated Lead or Contact. Without it the CRM keeps its default owner on create and the current owner on update; a mapping row on OwnerId takes precedence.","uniqueKey":"contacts.items.[INDEX].owner_id","typeLabel":"string"}},"uniqueKey":"contacts.items.[INDEX]","typeLabel":"object"},"description":"Contacts to create/update (company fields may be embedded on each contact).","uniqueKey":"contacts","typeLabel":"object[]"},"companies":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":true,"description":"Free-form record: keys must match the LoneScale field keys referenced by the configured mappings. See [Available Fields](/api-reference/crm-sync-fields) for the full list. The `lonescale_` / `main_` prefix is optional: `first_name`, `job_title`, `company_domain`, `email` and `phone` resolve like their prefixed form, and camelCase keys from enrich payloads (`firstName`, `jobTitle`, ...) are aliased too. A record whose keys match none of the mapped or unicity fields is failed, with the expected field keys in the error.","properties":{"account_crm_id":{"type":"string","description":"Optional CRM company id: targets that company directly instead of matching by unicity criteria.","uniqueKey":"companies.items.[INDEX].account_crm_id","typeLabel":"string"},"contact_crm_id":{"type":"string","description":"Optional CRM contact id (e.g. the id returned by POST /crm/search): updates that exact contact instead of matching by unicity criteria.","uniqueKey":"companies.items.[INDEX].contact_crm_id","typeLabel":"string"},"owner_id":{"type":"string","description":"Salesforce only. Optional User id (005…) that owns the created or updated Lead or Contact. Without it the CRM keeps its default owner on create and the current owner on update; a mapping row on OwnerId takes precedence.","uniqueKey":"companies.items.[INDEX].owner_id","typeLabel":"string"}},"uniqueKey":"companies.items.[INDEX]","typeLabel":"object"},"description":"Companies to create/update, without contacts.","uniqueKey":"companies","typeLabel":"object[]"},"webhook_url":{"type":"string","description":"Called once with the run summary when every record has been processed.","uniqueKey":"webhook_url","typeLabel":"string"},"webhook_id":{"type":"string","description":"Deliver every record to this platform webhook (id from `GET /webhooks`) instead of a CRM. No CRM connection or mapping is required. Mutually exclusive with `crm` / `settings_type`; distinct from `webhook_url` (the completion callback).","uniqueKey":"webhook_id","typeLabel":"string"},"idempotency_key":{"type":"string","description":"Reuse the same key to make client retries return the existing run instead of double-writing.","uniqueKey":"idempotency_key","typeLabel":"string"},"trigger_by":{"type":"string","uniqueKey":"trigger_by","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"settings_type":"\u003cstring>","contacts":[{"account_crm_id":"\u003cstring>","contact_crm_id":"\u003cstring>","owner_id":"\u003cstring>"}],"companies":[{"account_crm_id":"\u003cstring>","contact_crm_id":"\u003cstring>","owner_id":"\u003cstring>"}],"webhook_url":"\u003cstring>","webhook_id":"\u003cstring>","idempotency_key":"\u003cstring>","trigger_by":"\u003cstring>"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"cc5f056d-e37f-4be3-a4a4-21992b38c1ae":{"description":"CRM sync run accepted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Run id, used to poll the status endpoint","uniqueKey":"id","typeLabel":"string"},"status":{"type":"string","example":"processing","uniqueKey":"status","typeLabel":"string"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"records_received":{"type":"integer","uniqueKey":"records_received","typeLabel":"integer"},"crm":{"type":"string","example":"hubspot","uniqueKey":"crm","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","status":"processing","createdAt":"2023-11-07T05:31:56Z","records_received":123,"crm":"hubspot"}}},"exampleType":"generated"}},"exampleType":"generated"},"0fb41dc5-3a69-4152-b1b4-a36b5e2dca0a":{"description":"Invalid or missing authentication credentials","content":{"application/json":{"schema":{"required":["message","error","statusCode"],"type":"object","properties":{"message":{"type":"string","example":"Invalid API Key","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"statusCode":{"type":"integer","example":401,"isRequired":true,"uniqueKey":"statusCode","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"Invalid API Key","error":"Unauthorized","statusCode":401},"examples":{"Example":{"title":"Example","value":{"message":"Invalid API Key","error":"Unauthorized","statusCode":401}}},"exampleType":"examples"}},"exampleType":"examples"},"0ed91244-cef3-4481-bf6e-eb89cd3f3aa8":{"description":"Ambiguous configuration: several CRMs (or several settings records) match; pass `crm` and/or `settings_type`","content":{"application/json":{"schema":{"required":["error","message"],"type":"object","properties":{"error":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"error","typeLabel":"integer\u003cint32>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"Multiple CRMs have mapping settings (hubspot, salesforce); pass \"crm\" to pick one","error":"Conflict","statusCode":409},"examples":{"Example":{"title":"Example","value":{"message":"Multiple CRMs have mapping settings (hubspot, salesforce); pass \"crm\" to pick one","error":"Conflict","statusCode":409}}},"exampleType":"examples"}},"exampleType":"examples"},"633a0d58-c39e-4fb7-b883-d614f33beb63":{"description":"No mapping settings configured for the CRM, or empty payload","content":{"application/json":{"schema":{"required":["error","message"],"type":"object","properties":{"error":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"error","typeLabel":"integer\u003cint32>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"No hubspot integration mapping settings found; configure the hubspot integration in LoneScale first","error":"Unprocessable Entity","statusCode":422},"examples":{"Example":{"title":"Example","value":{"message":"No hubspot integration mapping settings found; configure the hubspot integration in LoneScale first","error":"Unprocessable Entity","statusCode":422}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"3fdd0f0e-af82-4d8a-af9c-9a32e34a28d1":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Provide your API key in the x-api-key header.","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"70167a7e-c866-4cf8-bba8-144111851d01":{"url":"https://public-api.lonescale.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Provide your API key in the x-api-key header.","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"Provide your API key in the x-api-key header.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"lonescale-5883e47c","siteName":"LoneScale API Doc","title":"CRM Sync - LoneScale API Doc","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-31T14:44:19.040Z","originalFileLocation":"api-reference/endpoint/crm-sync.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved. Record keys must match the LoneScale field keys referenced by your configured mappings (for example lonescale_first_name, lonescale_company_domain, or any custom key you mapped); see Available Fields for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set account_crm_id on a record to target an existing CRM company by id instead of matching by unicity criteria. Poll GET /trigger/crm-sync/{id} with the returned id, or pass a webhook_url to be called once with the run summary when every record has been processed.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LoneScale API Doc\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"CRM Sync - LoneScale API Doc\">\u003cmeta data-mint-head property=\"og:description\" content=\"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved. Record keys must match the LoneScale field keys referenced by your configured mappings (for example lonescale_first_name, lonescale_company_domain, or any custom key you mapped); see Available Fields for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set account_crm_id on a record to target an existing CRM company by id instead of matching by unicity criteria. Poll GET /trigger/crm-sync/{id} with the returned id, or pass a webhook_url to be called once with the run summary when every record has been processed.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LoneScale API Doc\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lonescale.com/api-reference/endpoint/crm-sync\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lonescale-5883e47c.mintlify.site/_mintlify/api/og/v2?division=CRM+Sync\u0026amp;title=CRM+Sync\u0026amp;description=Push+contacts+and%2For+companies+directly+into+your+connected+CRM.+LoneScale+creates+or+updates+the+records+asynchronously%2C+applying+the+team-level+integration+fi\u0026amp;theme=3d6426264ba5883086120849\u0026amp;signature=06efa4631d9b571c47f42b87ebe3cb3cda4661a9aeb331237f1ebea66fcaa916\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"CRM Sync - LoneScale API Doc\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved. Record keys must match the LoneScale field keys referenced by your configured mappings (for example lonescale_first_name, lonescale_company_domain, or any custom key you mapped); see Available Fields for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set account_crm_id on a record to target an existing CRM company by id instead of matching by unicity criteria. Poll GET /trigger/crm-sync/{id} with the returned id, or pass a webhook_url to be called once with the run summary when every record has been processed.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lonescale-5883e47c.mintlify.site/_mintlify/api/og/v2?division=CRM+Sync\u0026amp;title=CRM+Sync\u0026amp;description=Push+contacts+and%2For+companies+directly+into+your+connected+CRM.+LoneScale+creates+or+updates+the+records+asynchronously%2C+applying+the+team-level+integration+fi\u0026amp;theme=3d6426264ba5883086120849\u0026amp;signature=06efa4631d9b571c47f42b87ebe3cb3cda4661a9aeb331237f1ebea66fcaa916\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lonescale-5883e47c/hs7sBa03sxH_yIJW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LoneScale API Doc\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lonescale.com/api-reference/endpoint/crm-sync\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/crm-sync.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lonescale.com/#organization\",\"name\":\"LoneScale API Doc\",\"url\":\"https://docs.lonescale.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lonescale-5883e47c/WovNkkTIMlsr76Dy/logo/LoneScale-Logo-Preferred.png?fit=max\u0026auto=format\u0026n=WovNkkTIMlsr76Dy\u0026q=85\u0026s=f88739fcb1e0caffbf3f475cbb1af2ad\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lonescale.com#website\",\"name\":\"LoneScale API Doc\",\"url\":\"https://docs.lonescale.com\",\"publisher\":{\"@id\":\"https://docs.lonescale.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync#webpage\",\"url\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync\",\"name\":\"CRM Sync\",\"description\":\"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved. Record keys must match the LoneScale field keys referenced by your configured mappings (for example lonescale_first_name, lonescale_company_domain, or any custom key you mapped); see Available Fields for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set account_crm_id on a record to target an existing CRM company by id instead of matching by unicity criteria. Poll GET /trigger/crm-sync/{id} with the returned id, or pass a webhook_url to be called once with the run summary when every record has been processed.\",\"dateModified\":\"2026-08-31T14:44:19.040Z\",\"isPartOf\":{\"@id\":\"https://docs.lonescale.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"CRM Sync\",\"item\":\"https://docs.lonescale.com/api-reference/crm-sync-fields\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CRM Sync\",\"item\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync#apireference\",\"headline\":\"CRM Sync\",\"name\":\"CRM Sync\",\"description\":\"Push contacts and/or companies directly into your connected CRM. LoneScale creates or updates the records asynchronously, applying the team-level integration field mappings already configured in LoneScale (create/update fields and unicity criteria). No workflow is involved. Record keys must match the LoneScale field keys referenced by your configured mappings (for example lonescale_first_name, lonescale_company_domain, or any custom key you mapped); see Available Fields for the full list. For Salesforce the mapping also decides the object: map only the Lead section and the sync searches, updates or creates Leads instead of Contacts. Set account_crm_id on a record to target an existing CRM company by id instead of matching by unicity criteria. Poll GET /trigger/crm-sync/{id} with the returned id, or pass a webhook_url to be called once with the run summary when every record has been processed.\",\"url\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lonescale.com/api-reference/endpoint/crm-sync#webpage\"},\"dateModified\":\"2026-08-31T14:44:19.040Z\",\"publisher\":{\"@id\":\"https://docs.lonescale.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lonescale.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LoneScale API Doc\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"LoneScale API Doc","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://docs.lonescale.com"},{"anchor":"Help Center","icon":"newspaper","href":"https://help-center.lonescale.com/"}]},"tabs":[{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Authentication","icon":"key","href":"/authentication"},{"title":"Get user information","openapi":"GET /users","href":"/api-reference/endpoint/get"}]},{"group":"API Enrichment","pages":[{"title":"Enrich Contacts","openapi":"POST /trigger/enrich","href":"/api-reference/endpoint/create"},{"title":"Enrich Contacts (Sync)","openapi":"POST /trigger/enrich/sync","href":"/api-reference/endpoint/enrich-sync"},{"title":"Contact Enrichment History","openapi":"GET /contacts/{identifier}/enrichment-history","href":"/api-reference/endpoint/enrichment-history"},{"title":"Verify Phone Number","openapi":"POST /verify-phone","href":"/api-reference/endpoint/verify-phone"},{"title":"Search Contacts","openapi":"POST /trigger/contact-sourcing","href":"/api-reference/endpoint/contact-sourcing"},{"title":"Search Contacts (Sync)","openapi":"POST /trigger/contact-sourcing/sync","href":"/api-reference/endpoint/contact-sourcing-sync"}]},{"group":"Companies","pages":[{"title":"Search Company","openapi":"GET /companies/search","href":"/api-reference/endpoint/companies-search"}]},{"group":"CRM Sync","pages":[{"title":"Available Fields","icon":"list","description":null,"href":"/api-reference/crm-sync-fields"},{"title":"CRM Sync","openapi":"POST /trigger/crm-sync","href":"/api-reference/endpoint/crm-sync"},{"title":"CRM Sync Status","openapi":"GET /trigger/crm-sync/{id}","description":"Get the status and progress counters of a CRM sync run.","href":"/api-reference/endpoint/crm-sync-status"},{"title":"CRM Sync Delivery Log","openapi":"GET /trigger/crm-sync/{id}/records","href":"/api-reference/endpoint/crm-sync-records"},{"title":"CRM Search","openapi":"POST /crm/search","href":"/api-reference/endpoint/crm-search"},{"title":"CRM Mapping Preview","openapi":"GET /crm/mapping","href":"/api-reference/endpoint/crm-mapping"}]},{"group":"Today's accounts","pages":[{"title":"Get today's accounts","openapi":"GET /todays-accounts","href":"/api-reference/endpoint/todays-accounts-list"},{"title":"Refresh today's accounts","openapi":"POST /todays-accounts/refresh","href":"/api-reference/endpoint/todays-accounts-refresh"},{"title":"Search sales reps","openapi":"GET /todays-accounts/owners","href":"/api-reference/endpoint/todays-accounts-owners"},{"title":"Assign an account","openapi":"POST /todays-accounts/assign","href":"/api-reference/endpoint/todays-accounts-assign"},{"title":"Dismiss an account","openapi":"POST /todays-accounts/dismiss","href":"/api-reference/endpoint/todays-accounts-dismiss"},{"title":"Enrich the contact","openapi":"POST /todays-accounts/enrich","href":"/api-reference/endpoint/todays-accounts-enrich"},{"title":"Find people","openapi":"POST /todays-accounts/find-people","href":"/api-reference/endpoint/todays-accounts-find-people"}]},{"group":"Webhooks","pages":[{"title":"List Webhooks","openapi":"GET /webhooks","href":"/api-reference/endpoint/webhooks-list"}]},{"group":"Lists","pages":[{"title":"Get all lists","openapi":"GET /lists","href":"/api-reference/endpoint/lists-get-all"},{"title":"Create a list","openapi":"POST /lists","href":"/api-reference/endpoint/lists-create"},{"title":"Get a list","openapi":"GET /lists/{listId}","href":"/api-reference/endpoint/lists-get"},{"title":"Delete a list","openapi":"DELETE /lists/{listId}","href":"/api-reference/endpoint/lists-delete"},{"title":"Get list items","openapi":"GET /lists/{listId}/items","href":"/api-reference/endpoint/lists-get-items"},{"title":"Add an item to a list","openapi":"POST /lists/{listId}/item","href":"/api-reference/endpoint/lists-add-item"},{"title":"Remove an item from a list","openapi":"DELETE /lists/{listId}/item/{itemId}","href":"/api-reference/endpoint/lists-delete-item"}]},{"group":"Webhook Payload","pages":[{"title":"Contact Enrichment Payload","href":"/api-reference/webhookpayload/enrichment-payload"},{"title":"Search Contacts Payload","href":"/api-reference/webhookpayload/sourcing-payload"},{"title":"Notification Payload","href":"/api-reference/webhookpayload/notification-payload"}]}]}]},"basePath":"","title":"CRM Sync - LoneScale API Doc","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-5FCzAcfS.js","utils-SLtAG4EZ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-2DZi8ZMu.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D7J3nkzE.js","snippetPresets-D0Alv0AH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BI4qNJ2c.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BD3uyr8j.js","shallow-D8iEBr5z.js","getApiPlaygroundDisplay-CgNP4lzR.js","CodeSnippet-CX-QHuMs.js","CodeSnippets-VlXE-ZUf.js","Page-D9ithiIZ.js","getPastedJson-DYNQkZ1M.js","icon-CzacdwOi.js","MethodPill-2JVqoYKi.js","DuplicateIcon-_xVXs-U8.js","createIcon-BRHrweLo.js","DynamicMarkdown-mQG_iQiE.js","SectionHeading-DMpJzv8f.js","axios-vUo_bRtp.js","Markdown-5FGIym-8.js","clsx-D-TRO5q5.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CdrJecqK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CHlcWBLM.js"]}