Add a contact to a company

Associates a contact with a company. If the company doesn't exist and you provide a custom
company ID (with cid: prefix), it will be automatically created.

How to Identify the Contact

Use any of these identifier formats in the URL path:

How to Identify the Company

In the request body, use company_id with one of these formats:

  • Numeric ID: 12345 (company must exist)
  • Custom company ID: cid:company_abc123 (will be created if it doesn't exist)

Auto-Create Company Behavior

  • If you use a numeric company ID and it doesn't exist, the request will fail with 404
  • If you use a custom company ID (cid:...) and it doesn't exist, it will be automatically created
    • The new company will use the company_name from the request (or the custom_company_id if name is not provided)
    • You can optionally set company attributes in the same request

Request Body

  • company_id (required): Company identifier (numeric or cid:custom_id)
  • company_name (optional): Company name (used when auto-creating a company)
  • attributes (optional): Object with custom company attributes to set

Response

Returns HTTP 201 (Created) with an empty response body on success.

Example Requests

# Add contact to existing company
PUT /contacts/cuid:user_123/companies
{
  "company_id": "12345"
}

# Add contact to company (auto-create if doesn't exist)
PUT /contacts/29911301/companies
{
  "company_id": "cid:acme_corp",
  "company_name": "Acme Corporation",
  "attributes": {
    "industry": "Technology",
    "employees": "50-100"
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Contact identifier. Can be: numeric ID (e.g., '12345'), custom user ID with 'cuid:' prefix (e.g., 'cuid:user_123'), custom lead ID with 'clid:' prefix (e.g., 'clid:lead_456'), WhatsApp with 'wa:' prefix (e.g., 'wa:+1234567890'), or email with 'uem:' or 'lem:' prefix (e.g., 'uem:[email protected]' for users or 'lem:[email protected]' for leads).

Body Params
string
required

Company identifier. Use numeric ID (e.g., '12345') for existing companies, or custom ID with 'cid:' prefix (e.g., 'cid:company_abc123') which will auto-create the company if it doesn't exist.

string

Company name (used when auto-creating a company with custom ID). If not provided, the custom_company_id will be used as the name.

attributes
object

Optional custom attributes to set on the company

Responses
201

Contact successfully added to company. If the company didn't exist and a custom company ID was used, the company was created.

400

Invalid request data

401

Authentication credentials are missing or invalid

403

You don't have permission to add contacts to companies

404

Contact not found, or company not found (when using numeric company ID)

422

Validation error: company_id is required or has invalid format

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here!