Create a CRM company
Creates a business customer. When another company already has the org number, nothing is created and the response has `status` `duplicate` with the matches. Send `force: true` to create it anyway; both are then flagged as possible duplicates.
Creates a business customer. When another company already has the org number, nothing is created and the response has status duplicate with the matches. Send force: true to create it anyway; both are then flagged as possible duplicates.
Authorization
x-api-key Company API key, created under Settings > API Keys.
In: header
Header Parameters
Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.
^[0-9a-fA-F]{24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/crm/companies" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "company": { "accountingCustomerId": "string", "archiveBatchId": "string", "archivedAt": "2019-08-24T14:15:22Z", "companyId": "string", "createdAt": "2019-08-24T14:15:22Z", "dedupOrgNumber": "string", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "isExample": true, "itxCorporateId": "string", "itxLastSyncedAt": "2019-08-24T14:15:22Z", "lastActivityActorId": "string", "lastActivityAt": "2019-08-24T14:15:22Z", "lastWebhookOccurredAt": "2019-08-24T14:15:22Z", "metadata": { "itx": { "snapshot": { "active": true, "contactEmails": [ "string" ], "corpId": 0, "deliveryAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "faxNumbers": [ "string" ], "id": 0, "invoiceAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "invoiceEmails": [ "string" ], "landLineNumbers": [ "string" ], "mainAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "mobileNumbers": [ "string" ], "officeNumbers": [ "string" ], "postalAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "switchboardNumbers": [ "string" ], "visitAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "property1": null, "property2": null }, "snapshotAt": "string" } }, "naceCode": "string", "naceDescription": "string", "name": "string", "number": 0, "orgForm": "string", "orgNumber": "string", "orgNumberVerified": true, "registeredAddress": "string", "registryRefreshedAt": "2019-08-24T14:15:22Z", "registryStatus": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "duplicate": { "matches": [ { "accountingCustomerId": "string", "archiveBatchId": "string", "archivedAt": "2019-08-24T14:15:22Z", "companyId": "string", "createdAt": "2019-08-24T14:15:22Z", "dedupOrgNumber": "string", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "isExample": true, "itxCorporateId": "string", "itxLastSyncedAt": "2019-08-24T14:15:22Z", "lastActivityActorId": "string", "lastActivityAt": "2019-08-24T14:15:22Z", "lastWebhookOccurredAt": "2019-08-24T14:15:22Z", "metadata": { "itx": { "snapshot": { "active": true, "contactEmails": [ "string" ], "corpId": 0, "deliveryAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "faxNumbers": [ "string" ], "id": 0, "invoiceAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "invoiceEmails": [ "string" ], "landLineNumbers": [ "string" ], "mainAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "mobileNumbers": [ "string" ], "officeNumbers": [ "string" ], "postalAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "switchboardNumbers": [ "string" ], "visitAddresses": [ { "apartment": "string", "country": "string", "countryCode": "string", "floor": 0, "line1": "string", "line2": "string", "postBox": "string", "postalCity": "string", "postalCode": "string", "street": "string", "streetNumber": "string" } ], "property1": null, "property2": null }, "snapshotAt": "string" } }, "naceCode": "string", "naceDescription": "string", "name": "string", "number": 0, "orgForm": "string", "orgNumber": "string", "orgNumberVerified": true, "registeredAddress": "string", "registryRefreshedAt": "2019-08-24T14:15:22Z", "registryStatus": "string", "updatedAt": "2019-08-24T14:15:22Z" } ], "reason": "orgNumber" }, "status": "created"}Archive a CRM company POST
Archives the company. A company with active contacts or open deals needs a decision first: without `mode` the response has `status` `needs_decision` with the counts, and nothing is archived. Send again with `mode` `detach` or `cascade`. A company shared with you through your chain returns 403; only its owner can archive it.
Get a CRM company GET
Returns the company with its tags and custom field values. Archived companies and ids from another company return 404. A company shared with you through a chain lead comes back with `sharedViaChain` set.