This endpoint updates an existing company using sparse PUT semantics. Any field you include is replaced with the value you provide; any field you omit is left untouched.
Path Parameters
integer
required
The unique identifier of the company to update.
Request Body
At least one of domain, external_id, or name must be provided.
string | null
New domain for the company. This is an identifier, not just a label: it decides which company future events from that email domain are matched to. The value is trimmed and lowercased before storing, matching ingestion — a blank string is treated as null. Omit the key to leave the existing domain untouched.Sending null (or blank) releases the company’s domain claim: the company keeps its id, history, and contacts, but future events from that domain will create or match a different company instead. Re-sending the current domain is a no-op 200.If the new domain already belongs to another company in the Space, the request is rejected with 409 and nothing is changed — see Error Response below. Maximum 255 characters.
string | integer | null
New external ID for the company — your own account/company identifier, the same value you send as company_external_id on events. This is an identifier, not just a label: it decides which company future events carrying that company_external_id are matched to. Unlike domain, it is stored byte-exact: trimmed, but case is preserved — ACCT_1 and acct_1 are two different ids. 1 to 190 characters after trimming; a blank string is treated as null. Integers are accepted and stored as their decimal string (e.g. 1234567). Omit the key to leave the existing external ID untouched.Sending null (or blank) releases the company’s claim on the external ID: the company keeps its id, history, and contacts, but future events carrying that company_external_id will create or match a different company instead. Re-sending the current external ID is a no-op 200.If the new external ID already belongs to another company in the Space, the request is rejected with 409 and nothing is changed — see Error Response below. Floats, arrays, and booleans are rejected with a 422.
Ingestion only groups by company_external_id when the Space’s company identity mode (Settings > Workspace > Company tracking) is set to External ID. In the default Auto mode, the value you set here is stored and returned by this API, but event ingestion groups companies by email domain and ignores company_external_id.
string
New name for the company. Omit to leave the existing name untouched. Maximum 255 characters. Cannot be null — the stored value is a required column, so sending name: null returns a 422.
Response
Success Response
Returns the full company object after the update.
string
The unique identifier of the company.
string | null
The domain currently associated with this company. null if the company has no domain claim — either it was created from a customer-supplied external ID alone, or its domain was released via this endpoint.
string | null
The external ID currently associated with this company. null if the company has no external ID claim — either it was created from an email domain alone, or its external ID was released via this endpoint.
string
The name currently associated with this company.
Error Response
string
Error description explaining what went wrong.
On a 409 conflict, the response also includes:
string
The identifier field that caused the conflict: domain or external_id.
string
The ID of the company in this Space that already owns the given domain or external_id (see field). Re-point contacts to that company, or update it directly, instead of retrying this request.
API key doesn’t have permission or subscription is inactive
404
Company not found
409
The given domain or external_id already belongs to another company in this Space. Nothing is changed.
422
Invalid parameters provided (check error message for details)
429
Too many requests - rate limit exceeded. See Rate Limiting
Notes
Rate Limit: This endpoint has a limit of 60 requests per minute per Space. See Rate Limiting for details.
Sparse PUT semantics: Only the fields you include in the request body are modified. Other columns are left untouched.
At least one field is required: A request with none of domain, external_id, or name is rejected with a 422 error.
domain and external_id are identifiers, not just labels: domain determines which company future events from that email domain are matched to; external_id determines which company future events carrying that company_external_id are matched to. Changing either moves the company’s claim on that identifier away from wherever it lived before.
Domains are normalized, external IDs are byte-exact: domain values are trimmed and lowercased before storing, to match how the tracker resolves domains during ingestion. external_id values are trimmed but case is preserved — ACCT_1 and acct_1 are different ids — 1 to 190 characters after trimming; integers are accepted and stored as their decimal string. A blank string is treated as null for either field.
domain: null or external_id: null releases the claim: the company keeps its id, history, and contacts, but future events matching that identifier will create or match a different company. Re-sending the current value is a no-op 200.
Identifier conflicts are rejected, not merged: if the new domain or external_id already belongs to another company in the Space, the request fails with 409 and conflicting_company_id naming the owner, with field naming which identifier conflicted. Nothing is written. Re-point contacts to the existing company, or update it directly, instead of retrying.
external_id only affects ingestion in External ID mode: event ingestion only groups by company_external_id when the Space’s company identity mode (Settings > Workspace > Company tracking) is set to External ID. In the default Auto mode, the value set here is stored and returned by this API but ignored for grouping.
name cannot be cleared: unlike domain and external_id, name is a required column in the tracker. Sending name: null returns a 422 — omit the key instead if you don’t want to change it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cometly Docs","description":"Cometly documentation: set up ad tracking and attribution, connect your ad platforms and tools, send conversions back with the Conversion API, and build on the Cometly API and MCP server.","colors":{"primary":"#0086FF","light":"#0086FF","dark":"#0086FF"},"logo":{"light":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/light.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=1b725e99cd933554c9ab680583d1b779","dark":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/dark.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=5b27a31c96508945608d23fa3394eafc"},"favicon":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/favicon.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=676feb9017410d273527df10995ef763","api":{"playground":{},"mdx":{"auth":{"method":"bearer"},"server":"https://app.cometly.com"}},"navbar":{"links":[{"href":"mailto:support@cometly.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.cometly.com"}},"seo":{"metatags":{"og:site_name":"Cometly Docs","og:locale":"en_US","twitter:card":"summary_large_image"},"indexing":"navigable"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cometly","hasAudioNarration":false,"actualSubdomain":"cometly","customDomains":["docs.cometly.com"],"gitSource":{"type":"github","owner":"cometly","repo":"app","deployBranch":"main","contentDirectory":"publicApiDocs/V1","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aff39a297e1b315b98c87b5","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Integrations","count":137},{"language":"default","tag":"Guides","count":70},{"language":"default","tag":"Integrations by platform","count":68},{"language":"default","tag":"MCP","count":62},{"language":"default","tag":"Tools","count":53},{"language":"default","tag":"Troubleshooting","count":50},{"language":"default","tag":"Developers \u0026 API","count":44},{"language":"default","tag":"Getting Started","count":38},{"language":"default","tag":"Settings","count":23},{"language":"default","tag":"Events","count":22}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@cometly.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".card-group .card{transition:background-color 150ms ease, border-color 150ms ease}.card-group .card:hover{background-color:#f6f7f8!important}.dark .card-group .card:hover{background-color:rgba(255, 255, 255, 0.04)!important}.start-cards .card-group .card{position:relative;isolation:isolate;background-color:#ffffff!important;background-image:radial-gradient(110% 60% at 50% 115%, rgba(0, 134, 255, 0.05) 0%, transparent 70%),\n linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)!important;border-color:#e4e7ec!important;box-shadow:0 1px 2px rgba(16, 24, 40, 0.04);transition:border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease}.start-cards .card-group .card::before{content:\"\";position:absolute;inset:auto 0 0 0;height:85%;z-index:-1;pointer-events:none;background-image:repeating-linear-gradient(90deg, rgba(100, 116, 139, 0.15) 0, rgba(100, 116, 139, 0.15) 1px, transparent 1px, transparent 26px),\n repeating-linear-gradient(90deg, transparent 0, transparent 13px, rgba(100, 116, 139, 0.08) 13px, rgba(100, 116, 139, 0.08) 14px, transparent 14px, transparent 26px);-webkit-mask-image:linear-gradient(to top, #000 0%, transparent 90%);mask-image:linear-gradient(to top, #000 0%, transparent 90%);opacity:0.8;transition:opacity 200ms ease}.start-cards .card-group .card:hover{background-color:#ffffff!important;border-color:rgba(0, 134, 255, 0.45)!important;box-shadow:0 12px 28px -16px rgba(0, 134, 255, 0.35), 0 1px 2px rgba(16, 24, 40, 0.05);transform:translateY(-1px)}.start-cards .card-group .card:hover::before{opacity:1}.start-cards [data-component-part=\"card-image\"]{display:block;width:100%;height:auto;margin:0!important;border-bottom:1px solid #eceef2}.start-cards [data-component-part=\"card-icon\"]{display:flex;align-items:center;justify-content:center;width:2.5rem!important;height:2.5rem!important;border-radius:0.75rem;background:linear-gradient(135deg, #46a9ff 0%, #0086ff 55%, #0068d6 100%);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 14px -6px rgba(0, 134, 255, 0.65)}.start-cards [data-component-part=\"card-icon\"]>svg{width:1.25rem!important;height:1.25rem!important;background-color:#ffffff!important}.dark .start-cards .card-group .card,.dark .start-cards .card-group .card:hover{background-color:rgba(255, 255, 255, 0.02)!important;background-image:radial-gradient(110% 60% at 50% 115%, rgba(0, 134, 255, 0.14) 0%, transparent 70%)!important;border-color:rgba(255, 255, 255, 0.12)!important}.dark .start-cards .card-group .card:hover{border-color:rgba(70, 169, 255, 0.6)!important}.dark .start-cards .card-group .card::before{background-image:repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.2) 0, rgba(148, 163, 184, 0.2) 1px, transparent 1px, transparent 26px),\n repeating-linear-gradient(90deg, transparent 0, transparent 13px, rgba(148, 163, 184, 0.1) 13px, rgba(148, 163, 184, 0.1) 14px, transparent 14px, transparent 26px)}.dark .start-cards [data-component-part=\"card-image\"]{border-bottom-color:rgba(255, 255, 255, 0.08)}.logo-tile{display:inline-flex;align-items:center;justify-content:center;flex:none;width:2.5rem;height:2.5rem;border-radius:0.75rem;border:1px solid #e5e7eb;background:#ffffff;overflow:hidden}.logo-tile img{width:1.375rem!important;height:1.375rem!important;max-width:none!important;margin:0!important;border-radius:0!important;object-fit:contain;pointer-events:none}.logo-tile-sm{width:2rem;height:2rem;border-radius:0.5rem}.logo-tile-sm img{width:1.125rem!important;height:1.125rem!important}.logo-tile-letter{font-size:0.8125rem;font-weight:600;color:#6b7280;background:#f9fafb}.dark .logo-tile{border-color:rgba(255, 255, 255, 0.12)}.logo-row{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin-top:0.875rem}.logo-more{margin-left:0.25rem;font-size:0.8125rem;font-weight:500;color:#6b7280;white-space:nowrap}.dark .logo-more{color:#9ca3af}.integration-grid{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:0.25rem 0.75rem;margin:1rem 0 0.5rem}@media (min-width: 640px){.integration-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 1024px){.integration-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}}.integration-grid a{display:flex;align-items:center;gap:0.625rem;padding:0.375rem 0.5rem;border-radius:0.625rem;border:0!important;font-size:0.875rem;font-weight:500!important;line-height:1.3;color:inherit!important;text-decoration:none!important;transition:background-color 150ms ease}.integration-grid a:hover{background-color:#f6f7f8}.dark .integration-grid a:hover{background-color:rgba(255, 255, 255, 0.04)}.dark li>a img[src^=\"/images/logos/\"]{background:#ffffff!important;border-radius:0.25rem;padding:1px}"}]}
{"page":{"pagePath":"api-reference/endpoint/update-company","slug":"/api-reference/endpoint/update-company","pageMetadata":{"title":"Update Company","api":"PUT https://app.cometly.com/public-api/v1/companies/{id}","description":"Update a company's domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.","og:title":"Update a Company with the Cometly API","href":"/api-reference/endpoint/update-company"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Update a company’s domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`This endpoint updates an existing company using `,_jsx(_components.strong,{children:`sparse PUT`}),` semantics. Any field you include is replaced with the value you provide; any field you omit is left untouched.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`id`,type:`integer`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`The unique identifier of the company to update.`})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(_components.p,{children:[`At least one of `,_jsx(_components.code,{children:`domain`}),`, `,_jsx(_components.code,{children:`external_id`}),`, or `,_jsx(_components.code,{children:`name`}),` must be provided.`]}),`\n`,_jsxs(ParamField,{body:`domain`,type:`string | null`,placeholder:`acme.io`,id:`param-domain`,children:[_jsxs(_components.p,{children:[`New domain for the company. `,_jsx(_components.strong,{children:`This is an identifier, not just a label`}),`: it decides which company future events from that email domain are matched to. The value is trimmed and lowercased before storing, matching ingestion — a blank string is treated as `,_jsx(_components.code,{children:`null`}),`. Omit the key to leave the existing domain untouched.`]}),_jsxs(_components.p,{children:[`Sending `,_jsx(_components.code,{children:`null`}),` (or blank) releases the company’s domain claim: the company keeps its `,_jsx(_components.code,{children:`id`}),`, history, and contacts, but future events from that domain will create or match a different company instead. Re-sending the current domain is a no-op `,_jsx(_components.code,{children:`200`}),`.`]}),_jsxs(_components.p,{children:[`If the new domain already belongs to another company in the Space, the request is rejected with `,_jsx(_components.code,{children:`409`}),` and nothing is changed — see `,_jsx(_components.a,{href:`#error-response`,children:`Error Response`}),` below. Maximum 255 characters.`]})]}),`\n`,_jsxs(ParamField,{body:`external_id`,type:`string | integer | null`,placeholder:`acct_8f3k2`,id:`param-external-id`,children:[_jsxs(_components.p,{children:[`New external ID for the company — your own account/company identifier, the same value you send as `,_jsx(_components.code,{children:`company_external_id`}),` on events. `,_jsx(_components.strong,{children:`This is an identifier, not just a label`}),`: it decides which company future events carrying that `,_jsx(_components.code,{children:`company_external_id`}),` are matched to. Unlike `,_jsx(_components.code,{children:`domain`}),`, it is stored byte-exact: trimmed, but case is `,_jsx(_components.strong,{children:`preserved`}),` — `,_jsx(_components.code,{children:`ACCT_1`}),` and `,_jsx(_components.code,{children:`acct_1`}),` are two different ids. 1 to 190 characters after trimming; a blank string is treated as `,_jsx(_components.code,{children:`null`}),`. Integers are accepted and stored as their decimal string (e.g. `,_jsx(_components.code,{children:`1234567`}),`). Omit the key to leave the existing external ID untouched.`]}),_jsxs(_components.p,{children:[`Sending `,_jsx(_components.code,{children:`null`}),` (or blank) releases the company’s claim on the external ID: the company keeps its `,_jsx(_components.code,{children:`id`}),`, history, and contacts, but future events carrying that `,_jsx(_components.code,{children:`company_external_id`}),` will create or match a different company instead. Re-sending the current external ID is a no-op `,_jsx(_components.code,{children:`200`}),`.`]}),_jsxs(_components.p,{children:[`If the new external ID already belongs to another company in the Space, the request is rejected with `,_jsx(_components.code,{children:`409`}),` and nothing is changed — see `,_jsx(_components.a,{href:`#error-response`,children:`Error Response`}),` below. Floats, arrays, and booleans are rejected with a `,_jsx(_components.code,{children:`422`}),`.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Ingestion only groups by `,_jsx(_components.code,{children:`company_external_id`}),` when the Space’s company identity mode (`,_jsx(_components.a,{href:`/settings/company-tracking`,children:_jsx(_components.strong,{children:`Settings > Workspace > Company tracking`})}),`) is set to `,_jsx(_components.strong,{children:`External ID`}),`. In the default `,_jsx(_components.strong,{children:`Auto`}),` mode, the value you set here is stored and returned by this API, but event ingestion groups companies by email domain and ignores `,_jsx(_components.code,{children:`company_external_id`}),`.`]})})]}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,placeholder:`Acme Inc`,id:`param-name`,children:_jsxs(_components.p,{children:[`New name for the company. Omit to leave the existing name untouched. Maximum 255 characters. Cannot be `,_jsx(_components.code,{children:`null`}),` — the stored value is a required column, so sending `,_jsx(_components.code,{children:`name: null`}),` returns a `,_jsx(_components.code,{children:`422`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`success-response`,children:`Success Response`}),`\n`,_jsx(_components.p,{children:`Returns the full company object after the update.`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-1`,children:_jsx(_components.p,{children:`The unique identifier of the company.`})}),`\n`,_jsx(ResponseField,{name:`domain`,type:`string | null`,id:`param-domain-1`,children:_jsxs(_components.p,{children:[`The domain currently associated with this company. `,_jsx(_components.code,{children:`null`}),` if the company has no domain claim — either it was created from a customer-supplied external ID alone, or its domain was released via this endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`external_id`,type:`string | null`,id:`param-external-id-1`,children:_jsxs(_components.p,{children:[`The external ID currently associated with this company. `,_jsx(_components.code,{children:`null`}),` if the company has no external ID claim — either it was created from an email domain alone, or its external ID was released via this endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The name currently associated with this company.`})}),`\n`,_jsx(Heading,{level:`3`,id:`error-response`,children:`Error Response`}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Error description explaining what went wrong.`})}),`\n`,_jsxs(_components.p,{children:[`On a `,_jsx(_components.code,{children:`409`}),` conflict, the response also includes:`]}),`\n`,_jsx(ResponseField,{name:`field`,type:`string`,id:`param-field`,children:_jsxs(_components.p,{children:[`The identifier field that caused the conflict: `,_jsx(_components.code,{children:`domain`}),` or `,_jsx(_components.code,{children:`external_id`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`conflicting_company_id`,type:`string`,id:`param-conflicting-company-id`,children:_jsxs(_components.p,{children:[`The ID of the company in this Space that already owns the given `,_jsx(_components.code,{children:`domain`}),` or `,_jsx(_components.code,{children:`external_id`}),` (see `,_jsx(_components.code,{children:`field`}),`). Re-point contacts to that company, or update it directly, instead of retrying this request.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`example-requests`,children:`Example Requests`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.cometly.com/public-api/v1/companies/12345\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"domain\": \"acme.io\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"external_id\": \"acct_8f3k2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Acme Inc\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`17`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` companyId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 12345`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`https://app.cometly.com/public-api/v1/companies/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'PUT'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` domain:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'acme.io'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` external_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'acct_8f3k2'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Acme Inc'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Updated company:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,numberOfLines:`26`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c?`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`php`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$companyId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 12345`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://app.cometly.com/public-api/v1/companies/'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $companyId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept: application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'domain'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'acme.io'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'external_id'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'acct_8f3k2'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'name'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Acme Inc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` curl_init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_setopt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CURLOPT_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_setopt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CURLOPT_CUSTOMREQUEST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'PUT'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_setopt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CURLOPT_HTTPHEADER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_setopt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CURLOPT_POSTFIELDS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`json_encode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_setopt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CURLOPT_RETURNTRANSFER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` curl_exec`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` json_decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_close`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?>`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`18`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`company_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 12345`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`url `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.cometly.com/public-api/v1/companies/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`company_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'domain'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'acme.io'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'external_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'acct_8f3k2'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Acme Inc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.put(url, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`200`}),_jsx(_components.td,{children:`Company successfully updated`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Missing or invalid API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:`API key doesn’t have permission or subscription is inactive`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`Company not found`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsxs(_components.td,{children:[`The given `,_jsx(_components.code,{children:`domain`}),` or `,_jsx(_components.code,{children:`external_id`}),` already belongs to another company in this Space. Nothing is changed.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:`Invalid parameters provided (check error message for details)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsxs(_components.td,{children:[`Too many requests - rate limit exceeded. See `,_jsx(_components.a,{href:`/introduction/rate-limiting`,children:`Rate Limiting`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rate Limit`}),`: This endpoint has a limit of `,_jsx(_components.strong,{children:`60 requests per minute`}),` per Space. See `,_jsx(_components.a,{href:`/introduction/rate-limiting`,children:`Rate Limiting`}),` for details.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Sparse PUT semantics`}),`: Only the fields you include in the request body are modified. Other columns are left untouched.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`At least one field is required`}),`: A request with none of `,_jsx(_components.code,{children:`domain`}),`, `,_jsx(_components.code,{children:`external_id`}),`, or `,_jsx(_components.code,{children:`name`}),` is rejected with a 422 error.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`domain`}),` and `,_jsx(_components.code,{children:`external_id`}),` are identifiers, not just labels`]}),`: `,_jsx(_components.code,{children:`domain`}),` determines which company future events from that email domain are matched to; `,_jsx(_components.code,{children:`external_id`}),` determines which company future events carrying that `,_jsx(_components.code,{children:`company_external_id`}),` are matched to. Changing either moves the company’s claim on that identifier away from wherever it lived before.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Domains are normalized, external IDs are byte-exact`}),`: `,_jsx(_components.code,{children:`domain`}),` values are trimmed and lowercased before storing, to match how the tracker resolves domains during ingestion. `,_jsx(_components.code,{children:`external_id`}),` values are trimmed but case is `,_jsx(_components.strong,{children:`preserved`}),` — `,_jsx(_components.code,{children:`ACCT_1`}),` and `,_jsx(_components.code,{children:`acct_1`}),` are different ids — 1 to 190 characters after trimming; integers are accepted and stored as their decimal string. A blank string is treated as `,_jsx(_components.code,{children:`null`}),` for either field.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`domain: null`}),` or `,_jsx(_components.code,{children:`external_id: null`}),` releases the claim`]}),`: the company keeps its `,_jsx(_components.code,{children:`id`}),`, history, and contacts, but future events matching that identifier will create or match a different company. Re-sending the current value is a no-op `,_jsx(_components.code,{children:`200`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Identifier conflicts are rejected, not merged`}),`: if the new `,_jsx(_components.code,{children:`domain`}),` or `,_jsx(_components.code,{children:`external_id`}),` already belongs to another company in the Space, the request fails with `,_jsx(_components.code,{children:`409`}),` and `,_jsx(_components.code,{children:`conflicting_company_id`}),` naming the owner, with `,_jsx(_components.code,{children:`field`}),` naming which identifier conflicted. Nothing is written. Re-point contacts to the existing company, or update it directly, instead of retrying.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`external_id`}),` only affects ingestion in External ID mode`]}),`: event ingestion only groups by `,_jsx(_components.code,{children:`company_external_id`}),` when the Space’s company identity mode (`,_jsx(_components.a,{href:`/settings/company-tracking`,children:_jsx(_components.strong,{children:`Settings > Workspace > Company tracking`})}),`) is set to `,_jsx(_components.strong,{children:`External ID`}),`. In the default `,_jsx(_components.strong,{children:`Auto`}),` mode, the value set here is stored and returned by this API but ignored for grouping.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`name`}),` cannot be cleared`]}),`: unlike `,_jsx(_components.code,{children:`domain`}),` and `,_jsx(_components.code,{children:`external_id`}),`, `,_jsx(_components.code,{children:`name`}),` is a required column in the tracker. Sending `,_jsx(_components.code,{children:`name: null`}),` returns a `,_jsx(_components.code,{children:`422`}),` — omit the key instead if you don’t want to change it.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update Company","api":"PUT https://app.cometly.com/public-api/v1/companies/{id}","description":"Update a company's domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.","og:title":"Update a Company with the Cometly API","href":"/api-reference/endpoint/update-company"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Success Response","slug":"success-response","depth":3,"children":[]},{"title":"Error Response","slug":"error-response","depth":3,"children":[]}]},{"title":"Example Requests","slug":"example-requests","depth":2,"children":[]},{"title":"Status Codes","slug":"status-codes","depth":2,"children":[]},{"title":"Notes","slug":"notes","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Update Company","path":"/public-api/v1/companies/{id}","servers":[{"url":"https://app.cometly.com"}],"method":"put","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"id":{"schema":[{"type":"integer","description":"The unique identifier of the company to update.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"domain":[{"type":"object","properties":{},"description":"New domain for the company. This is an identifier, not just a label : it decides which company future events from that email domain are matched to. The value is trimmed and lowercased before storing, matching ingestion — a blank string is treated as `null` . Omit the key to leave the existing domain untouched. Sending `null` (or blank) releases the company’s domain claim: the company keeps its `id` , history, and contacts, but future events from that domain will create or match a different company instead. Re-sending the current domain is a no-op `200` . If the new domain already belongs to another company in the Space, the request is rejected with `409` and nothing is changed — see Error Response below. Maximum 255 characters.","placeholder":"acme.io"}],"external_id":[{"type":"object","properties":{},"description":"New external ID for the company — your own account/company identifier, the same value you send as `company_external_id` on events. This is an identifier, not just a label : it decides which company future events carrying that `company_external_id` are matched to. Unlike `domain` , it is stored byte-exact: trimmed, but case is preserved — `ACCT_1` and `acct_1` are two different ids. 1 to 190 characters after trimming; a blank string is treated as `null` . Integers are accepted and stored as their decimal string (e.g. `1234567` ). Omit the key to leave the existing external ID untouched. Sending `null` (or blank) releases the company’s claim on the external ID: the company keeps its `id` , history, and contacts, but future events carrying that `company_external_id` will create or match a different company instead. Re-sending the current external ID is a no-op `200` . If the new external ID already belongs to another company in the Space, the request is rejected with `409` and nothing is changed — see Error Response below. Floats, arrays, and booleans are rejected with a `422` .","placeholder":"acct_8f3k2"}],"name":[{"type":"string","description":"New name for the company. Omit to leave the existing name untouched. Maximum 255 characters. Cannot be `null` — the stored value is a required column, so sending `name: null` returns a `422` .","placeholder":"Acme Inc"}]}}],"examples":{"example":{"value":{"domain":{},"external_id":{},"name":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"The unique identifier of the company."}],"domain":[{"type":"object","properties":{},"description":"The domain currently associated with this company. `null` if the company has no domain claim — either it was created from a customer-supplied external ID alone, or its domain was released via this endpoint."}],"external_id":[{"type":"object","properties":{},"description":"The external ID currently associated with this company. `null` if the company has no external ID claim — either it was created from an email domain alone, or its external ID was released via this endpoint."}],"name":[{"type":"string","description":"The name currently associated with this company."}],"message":[{"type":"string","description":"Error description explaining what went wrong."}],"field":[{"type":"string","description":"The identifier field that caused the conflict: `domain` or `external_id` ."}],"conflicting_company_id":[{"type":"string","description":"The ID of the company in this Space that already owns the given `domain` or `external_id` (see `field` ). Re-point contacts to that company, or update it directly, instead of retrying this request."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","domain":{},"external_id":{},"name":"\u003cstring>","message":"\u003cstring>","field":"\u003cstring>","conflicting_company_id":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/cometly/3e5ee102dead7316/cometly.js"],"subdomain":"cometly","siteName":"Cometly Docs","title":"Update a Company with the Cometly API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-18T21:55:49.877Z","originalFileLocation":"api-reference/endpoint/update-company.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=\"Update a company\u0026#x27;s domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cometly Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_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/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a Company with the Cometly API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Update a company\u0026#x27;s domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cometly Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cometly.com/api-reference/endpoint/update-company\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cometly.mintlify.site/_mintlify/api/og/v2?division=Companies\u0026amp;title=Update+Company\u0026amp;description=Update+a+company%27s+domain%2C+external+ID+or+name+with+the+Cometly+API.+Only+the+fields+you+send+change%2C+and+an+identifier+already+in+use+returns+409.\u0026amp;theme=4b81b0d192612debf11d7771\u0026amp;signature=c7f1497a7fb5d2dfe4ac3fec370c333f1613c7ef1591dd361b801b8db8afcb07\">\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=\"Update a Company with the Cometly API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Update a company\u0026#x27;s domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cometly.mintlify.site/_mintlify/api/og/v2?division=Companies\u0026amp;title=Update+Company\u0026amp;description=Update+a+company%27s+domain%2C+external+ID+or+name+with+the+Cometly+API.+Only+the+fields+you+send+change%2C+and+an+identifier+already+in+use+returns+409.\u0026amp;theme=4b81b0d192612debf11d7771\u0026amp;signature=c7f1497a7fb5d2dfe4ac3fec370c333f1613c7ef1591dd361b801b8db8afcb07\">\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/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cometly Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0086FF\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cometly.com/api-reference/endpoint/update-company\">\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/update-company.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cometly.com/#organization\",\"name\":\"Cometly Docs\",\"url\":\"https://docs.cometly.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/light.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=1b725e99cd933554c9ab680583d1b779\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cometly.com#website\",\"name\":\"Cometly Docs\",\"url\":\"https://docs.cometly.com\",\"publisher\":{\"@id\":\"https://docs.cometly.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cometly.com/api-reference/endpoint/update-company#webpage\",\"url\":\"https://docs.cometly.com/api-reference/endpoint/update-company\",\"name\":\"Update Company\",\"description\":\"Update a company's domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.\",\"dateModified\":\"2026-11-18T21:55:49.877Z\",\"isPartOf\":{\"@id\":\"https://docs.cometly.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cometly.com/api-reference/endpoint/update-company#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cometly.com/api-reference/endpoint/update-company#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Companies\",\"item\":\"https://docs.cometly.com/api-reference/endpoint/list-companies\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update Company\",\"item\":\"https://docs.cometly.com/api-reference/endpoint/update-company\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.cometly.com/api-reference/endpoint/update-company#apireference\",\"headline\":\"Update Company\",\"name\":\"Update Company\",\"description\":\"Update a company's domain, external ID or name with the Cometly API. Only the fields you send change, and an identifier already in use returns 409.\",\"url\":\"https://docs.cometly.com/api-reference/endpoint/update-company\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cometly.com/api-reference/endpoint/update-company#webpage\"},\"dateModified\":\"2026-11-18T21:55:49.877Z\",\"publisher\":{\"@id\":\"https://docs.cometly.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cometly.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cometly Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cometly Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/update-company.md","siteName":"Cometly Docs","nav":{"global":null,"tabs":[{"tab":"Getting Started","icon":"rocket","pages":[{"title":"Getting Started","href":""}]},{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/guides/overview"}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Troubleshooting","icon":"wrench","pages":[{"title":"Troubleshooting","href":"/support/troubleshooting/overview"}]},{"tab":"Developers \u0026 API","icon":"code","groups":[{"group":"API basics","pages":[{"title":"Cometly API","sidebarTitle":"Overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/introduction/authentication"},{"title":"Rate Limiting","href":"/introduction/rate-limiting"},{"title":"Status Codes","href":"/introduction/status-codes"},{"title":"Changelog","href":"/changelog"}]},{"group":"Events","pages":[{"title":"Create Event","api":"POST https://app.cometly.com/public-api/v1/events/track","href":"/api-reference/endpoint/create-event"},{"title":"List Events","api":"GET https://app.cometly.com/public-api/v1/events","href":"/api-reference/endpoint/list-events"},{"title":"Get Event","api":"GET https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/get-event"},{"title":"Update Event","api":"PUT https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/update-event"},{"title":"Delete Event","api":"DELETE https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/delete-event"},{"title":"Create Event Export","api":"POST https://app.cometly.com/public-api/v1/events/exports","href":"/api-reference/endpoint/create-event-export"},{"title":"Get Event Export","api":"GET https://app.cometly.com/public-api/v1/events/exports/{id}","href":"/api-reference/endpoint/get-event-export"}]},{"group":"Contacts","pages":[{"title":"Create Contact","api":"POST https://app.cometly.com/public-api/v1/contacts","href":"/api-reference/endpoint/create-contact"},{"title":"List Contacts","api":"GET https://app.cometly.com/public-api/v1/contacts","href":"/api-reference/endpoint/list-contacts"},{"title":"Get Contact","api":"GET https://app.cometly.com/public-api/v1/contacts/{id}","href":"/api-reference/endpoint/get-contact"},{"title":"Get Contact by Email","api":"GET https://app.cometly.com/public-api/v1/contacts/by-email/{email}","href":"/api-reference/endpoint/get-contact-by-email"},{"title":"Update Contact","api":"PUT https://app.cometly.com/public-api/v1/contacts/{id}","href":"/api-reference/endpoint/update-contact"},{"title":"Attach Contact Company","api":"PUT https://app.cometly.com/public-api/v1/contacts/{id}/company","href":"/api-reference/endpoint/attach-contact-company"},{"title":"Detach Contact Company","api":"DELETE https://app.cometly.com/public-api/v1/contacts/{id}/company","href":"/api-reference/endpoint/detach-contact-company"},{"title":"Delete Contact PII","api":"DELETE https://app.cometly.com/public-api/v1/contacts/{id}/pii","href":"/api-reference/endpoint/delete-contact-pii"},{"title":"Create Contact Export","api":"POST https://app.cometly.com/public-api/v1/contacts/exports","href":"/api-reference/endpoint/create-contact-export"},{"title":"Get Contact Export","api":"GET https://app.cometly.com/public-api/v1/contacts/exports/{id}","href":"/api-reference/endpoint/get-contact-export"}]},{"group":"Companies","pages":[{"title":"List Companies","api":"GET https://app.cometly.com/public-api/v1/companies","href":"/api-reference/endpoint/list-companies"},{"title":"Get Company","api":"GET https://app.cometly.com/public-api/v1/companies/{id}","description":"Retrieve a company by ID with the Cometly API. The response returns its id, name, domain and external_id; domain and external_id can be null.","href":"/api-reference/endpoint/get-company"},{"title":"Update Company","api":"PUT https://app.cometly.com/public-api/v1/companies/{id}","href":"/api-reference/endpoint/update-company"},{"title":"Create Company Export","api":"POST https://app.cometly.com/public-api/v1/companies/exports","description":"Start an asynchronous company export for a date range with the Cometly API. You get an export_id to poll for a download URL to a gzipped NDJSON file.","href":"/api-reference/endpoint/create-company-export"},{"title":"Get Company Export","api":"GET https://app.cometly.com/public-api/v1/companies/exports/{id}","href":"/api-reference/endpoint/get-company-export"}]},{"group":"Concepts","pages":[{"title":"Sending Data to Cometly","href":"/concepts/sending-data-to-cometly"},{"title":"Comet Token","href":"/concepts/comet-token"},{"title":"Exports vs Pagination","href":"/concepts/exports-vs-pagination"}]},{"group":"How-to guides","pages":[{"title":"Account-level attribution for B2B (company external ID)","href":"/guides/b2b-account-attribution"}]},{"group":"Data Warehouse","pages":[{"title":"Data Warehouse Exports","href":"/data-warehouse/overview"},{"title":"Set up an S3 destination","href":"/data-warehouse/s3-destination"},{"title":"Set up a Google Cloud Storage destination","href":"/data-warehouse/gcs-destination"},{"title":"Set up a Snowflake destination","href":"/data-warehouse/snowflake-destination"},{"title":"Set up a BigQuery destination","href":"/data-warehouse/bigquery-destination"},{"title":"Create an export","href":"/data-warehouse/create-export"}]},{"group":"Data Warehouse datasets","pages":[{"title":"Raw touchpoints","href":"/data-warehouse/datasets/raw-touchpoints"},{"title":"Raw conversions","href":"/data-warehouse/datasets/raw-conversions"},{"title":"Raw hits","href":"/data-warehouse/datasets/raw-hits"},{"title":"Attributed conversions","href":"/data-warehouse/datasets/attributed-conversions"},{"title":"Contacts","href":"/data-warehouse/datasets/contacts"},{"title":"Companies","href":"/data-warehouse/datasets/companies"},{"title":"Ad analytics","href":"/data-warehouse/datasets/ad-analytics"}]}]},{"tab":"MCP","icon":"robot","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Help \u0026 Support","icon":"headset","pages":[{"title":"Help \u0026 Support","href":"/support/contact"}]}]},"basePath":"","title":"Update a Company with the Cometly API","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-D4yvBxwa.js","snippetPresets-CkhhQaIQ.js","utils-XnMGX2lF.js","style-to-object-BY3JEAdk.js","utils-CRXL1dwr.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DvwRKZnA.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DYtgUc7n.js","_Uint8Array-D8z7zjjJ.js","isObject-FP1Yky1u.js","ApiExamples-RYQSJVS4.js","usePlaygroundInputsStore-k_R_BTDL.js","shallow-BwVhzryZ.js","isEqual-Cx5TQjMc.js","CodeSnippets-BDe2dS5N.js","CodeSnippet-C1QlaNYl.js","use-playground-group-access-DyQ_1IIe.js","Page-DQd9HN9r.js","api-description-markdown-BpDftTKT.js","DynamicMarkdown-CZT_WAnN.js","SectionHeading-K1iuDm9j.js","MethodPill-Dx3JIwHJ.js","getPastedJson-buPTdYs_.js","Check2Icon-DmMrzBYX.js","axios-CsQoIw0U.js"]}