post
https://api.customerly.io/v2/companies
Creates a new company or updates an existing one based on the provided identifiers.
This endpoint is idempotent and will never create duplicates.
How It Works
- If a company exists (based on identifiers), it will be updated
- If no company exists, a new one will be created
- Returns 201 Created for new companies, 200 OK for updated companies
How Identifiers Work
You must provide at least one identifier:
company_id: Internal Customerly ID (if specified, must exist)custom_company_id: Your custom identifier (company_id in your system)
Priority order:
company_id(internal ID) - if provided, must existcustom_company_id- if no internal ID, we'll search by this
Conflict Detection
If multiple identifiers are provided, they must either:
- All point to the same company, OR
- Point to no existing company (new company creation), OR
- company_id exists and other identifiers are "free" (will update the company_id company)
If different identifiers point to different companies, the request will fail with a conflict error.
Attributes
- Attributes: Merged incrementally (only specified attributes are created/updated, others remain unchanged)
- You can provide any custom key-value pairs in the
attributesobject
Response Data
The endpoint returns the complete company object including:
- All company basic information (ID, name, created date, last seen)
- All attributes (both updated and unchanged ones)
- Total number of contacts associated with this company
- HTTP status: 201 Created for new companies, 200 OK for updated companies
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
401Authentication credentials are missing or invalid
403You don't have permission to create/update companies
404company_id specified but not found
409Conflicting identifiers: the provided identifiers point to different companies
422Validation error: check that at least one identifier is provided and all values are valid