Skip to content

Companies & Contacts API

All endpoints require a valid Cloudflare Access JWT.

Base path: /api/deals


List companies with optional search.

ParamTypeDescription
searchqueryFilter by name or domain
pagequeryPage number (default 1, 50 per page)

Get a company with its contacts and deals.

Create a company. Requires can_update on deals.

Update a company. Requires can_update on deals.

Delete a company. Requires can_manage on deals.


List contacts with optional search and company filter.

ParamTypeDescription
searchqueryFilter by name or email
company_idqueryFilter by company
pagequeryPage number (default 1, 50 per page)

Get a contact with linked deals.

Create a contact. Requires can_update on deals.

Update a contact. Requires can_update on deals.

Delete a contact. Requires can_manage on deals.


Enrich a company from LinkedIn via Scrapin.io. Requires can_update on deals.

Calls searchCompany with the company’s name and domain. Stores the raw JSON response in linkedin_data and sets linkedin_enriched_at.

ParamTypeDescription
forcequerySet to true to bypass 24-hour rate guard

Responses

StatusDescription
200{ success: true, linkedin_data: {...} }
400No LinkedIn data found
404Company not found
409Already enriched within 24 hours (use ?force=true to override)

Enrich a contact from LinkedIn via Scrapin.io. Requires can_update on deals.

If the contact has a linkedin_url, calls enrichLinkedInProfile. Otherwise falls back to searchPerson using the contact’s name, email, and company info. Stores the normalized profile JSON in linkedin_data and sets linkedin_enriched_at. If the contact had no linkedin_url and the enrichment returns one, it is saved automatically.

ParamTypeDescription
forcequerySet to true to bypass 24-hour rate guard

Responses

StatusDescription
200{ success: true, linkedin_data: {...} }
400No LinkedIn data found
404Contact not found
409Already enriched within 24 hours (use ?force=true to override)