Companies
The CRM company object. Track accounts with lifecycle stages and tiers, and link contacts to companies with roles.
All endpoints require a Bearer JWT in the Authorization header plus an X-Workspace-Id header selecting the workspace.
/api/companiesAuth requiredList companies in the workspace with contact counts and open deal value. Supports filtering by tier and lifecycle stage.
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| tier | string | No | Filter by tier |
| lifecycle_stage | string | No | lead | prospect | customer | partner | churned |
| search | string | No | Matches name, domain, industry |
| limit | number | No | Default 50, max 200 |
| offset | number | No | Default 0 |
Response
{
"companies": [
{
"id": 1,
"workspace_id": 1,
"name": "Acme Corp",
"domain": "acme.com",
"tier": "A",
"lifecycle_stage": "customer",
"contact_count": 4,
"open_deal_value": 120000,
"open_deal_cents": 12000000
}
],
"total": 1
}/api/companiesAuth requiredCreate a company. Returns 409 if the name already exists, 422 for an unknown lifecycle stage.
Request Body
| Field | Type | Required | Note |
|---|---|---|---|
| name | string | Yes | Required, unique per workspace |
| domain | string | No | — |
| website | string | No | — |
| industry | string | No | — |
| employees | number | No | — |
| plan | string | No | — |
| tier | string | No | — |
| lifecycle_stage | string | No | Default 'lead' |
| health | string | No | — |
| owner | string | No | — |
| source | string | No | — |
| description | string | No | — |
Response
{
"id": 2,
"workspace_id": 1,
"name": "Globex",
"lifecycle_stage": "prospect",
"contact_count": 0,
"open_deal_value": 0,
"created_at": "2026-03-28T10:00:00Z"
}/api/companies/{company_id}Auth requiredGet a company with its linked contacts and related deals.
Response
{
"id": 1,
"name": "Acme Corp",
"lifecycle_stage": "customer",
"contacts": [ { "id": 3, "name": "Jane Doe", "link_role": "champion" } ],
"deals": [ { "id": 7, "title": "Enterprise plan", "value": 120000 } ]
}/api/companies/{company_id}Auth requiredUpdate company fields. All fields optional; returns 400 when no fields are provided.
Request Body
| Field | Type | Required | Note |
|---|---|---|---|
| name | string | No | — |
| domain | string | No | — |
| website | string | No | — |
| industry | string | No | — |
| employees | number | No | — |
| plan | string | No | — |
| tier | string | No | — |
| lifecycle_stage | string | No | — |
| health | string | No | — |
| owner | string | No | — |
| source | string | No | — |
| description | string | No | — |
Response
{
"id": 1,
"name": "Acme Corp",
"tier": "A",
"lifecycle_stage": "customer"
}/api/companies/{company_id}Auth requiredDelete a company and unlink all its contacts.
Response
{ "deleted": 1 }/api/companies/{company_id}/linksAuth requiredLink a contact to a company with an optional role. Returns 404 if the contact is missing, 409 if already linked.
Request Body
| Field | Type | Required | Note |
|---|---|---|---|
| contact_id | number | Yes | Contact to link |
| role | string | No | e.g. 'champion', 'billing' |
Response
{ "company_id": 1, "contact_id": 3, "role": "champion" }/api/companies/{company_id}/links/{contact_id}Auth requiredRemove a contact's link to a company.
Response
{ "company_id": 1, "contact_id": 3, "unlinked": true }/api/companies/stats/summaryAuth requiredWorkspace company counts grouped by lifecycle stage and tier.
Response
{
"total": 12,
"by_stage": { "lead": 5, "prospect": 4, "customer": 3 },
"by_tier": { "A": 2, "B": 6, "ungraded": 4 }
}