Companies
Companies represent clients, prospects, and partner organizations in the SM CRM.
Routes
GET /api/companies
List companies with pagination and filters.
Auth: Required
Query params:
| Param | Type | Description |
|---|---|---|
type | string | Filter by company_type (client, prospect, partner) |
product | string | Filter by product tag |
status | string | Filter by status (active, inactive, churned) |
source | string | Filter by source |
search | string | Search name or domain |
sort | string | revenue sorts by monthly_revenue DESC. Default: alphabetical |
page | number | Page number. Default: 1 |
limit | number | Results per page. Default: 25, max: 100 |
Response:
{
"ok": true,
"data": {
"items": [...],
"total": 42,
"page": 1,
"limit": 25,
"hasMore": true
}
}GET /api/companies/:id
Get a single company with counts and related data.
Auth: Required
Path params: id — company ID
Response includes:
- All company fields
contacts_count— number of linked contactsdeals_count— number of linked dealsengagements— active engagements (id, name, status, monthly_revenue, headcount)recent_invoices— last 12 invoices (id, amount, status, issued_date)
POST /api/companies
Create a new company.
Auth: Required
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Company name |
domain | string | no | Website domain |
industry | string | no | Industry |
employee_count | number | no | Headcount |
revenue_range | string | no | e.g. $1M-$10M |
company_type | string | no | client, prospect, partner. Default: prospect |
status | string | no | Default: active |
product | string | no | Product tag |
source | string | no | Default: manual |
health_score | number | no | 0–100. Default: 50 |
monthly_revenue | number | no | MRR in dollars |
total_contract_value | number | no | TCV |
notes | string | no | Internal notes |
Response: 201 Created
{ "ok": true, "data": { "id": "co_a1b2c3d4", "name": "Acme Corp" } }PATCH /api/companies/:id
Update company fields.
Auth: Required
Path params: id
Request body: Any subset of:
name, domain, industry, employee_count, revenue_range, company_type, status, product, source, health_score, engagement_score, contract_start, contract_end, contract_type, monthly_revenue, total_contract_value, payment_terms, margin_pct, cogs, profit, stripe_customer_id, qb_customer_id, enrichment_status, enrichment_data, apollo_id, linkedin_url, logo_url, close_id, close_url, notes, address, city, state, country, timezone, tags, icp_score, icp_tier, icp_product, slack_channel_url, pandadoc_id
Response:
{ "ok": true, "data": { "id": "co_a1b2c3d4", "updated": true } }GET /api/companies/:id/score
Get the ICP score for a company.
Auth: Required
Response:
{
"ok": true,
"data": {
"company_id": "co_a1b2c3d4",
"icp_score": 82,
"icp_tier": "A",
"breakdown": { ... }
}
}POST /api/companies/score-batch
Batch-score multiple companies against an ICP profile.
Auth: Required
Request body:
{ "icp_profile_id": "icp_a1b2", "company_ids": ["co_1", "co_2"] }