get
https://api.customerly.io/v2/contacts//companies
Returns a paginated list of companies that a contact is associated with.
Contact Identification
You can retrieve companies using various types of identifiers:
1. Customerly Contact ID (numeric):
- Use the internal contact ID directly (e.g.,
29911301) - Example:
GET /contacts/29911301/companies
2. Custom User ID (prefix: cuid:):
- Your own custom identifier for a registered user
- Example:
GET /contacts/cuid:user_123/companies
3. Custom Lead ID (prefix: clid:):
- Your own custom identifier for a lead
- Example:
GET /contacts/clid:lead_456/companies
4. WhatsApp Number (prefix: wa:):
- The contact's WhatsApp number in E.164 format
- Example:
GET /contacts/wa:+1234567890/companies
5. Email Address (prefix: uem: or lem:):
- For registered users:
uem:[email protected](User EMail) - For leads:
lem:[email protected](Lead EMail) - Example:
GET /contacts/uem:[email protected]/companies
Pagination
This endpoint uses cursor-based pagination:
per_page: Number of companies to return per page (default: 20, max: 100)cursor: The cursor value from the previous response to fetch the next page
Example pagination flow:
- First request:
GET /contacts/{id}/companies?per_page=20 - Response returns a
cursorvalue (e.g.,12345) and up to 20 companies - Next page:
GET /contacts/{id}/companies?per_page=20&cursor=12345 - Continue until
cursorisnull(no more companies available)
Response
Companies are ordered by association ID in descending order (most recent first).
Each company includes:
company_id: Internal Customerly company IDcustom_company_id: Your custom company identifier (if set)name: Company namecreated_at: Unix timestamp of company creationlast_seen_at: Unix timestamp of last activity
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
401Authentication required
404Contact not found
422Invalid request parameters