Manage companies — the organizations your contacts belong to.
See also: Contacts & Companies concepts
| Method | Path | Description |
|---|---|---|
| POST | /companies | Create a company |
| GET | /companies | List companies |
| GET | /companies/:id | Get a company |
| PATCH | /companies/:id | Update a company |
| DELETE | /companies/:id | Delete a company |
| GET | /companies/:id/contacts | List contacts at a company |
| GET | /companies/:id/deals | List deals for a company |
POST /companies
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Company name |
domain | string | no | Primary domain (unique; used for dedup and enrichment) |
industry | string | no | Industry vertical |
size | string | no | Employee count range: 1-10, 11-50, 51-200, 201-1000, 1000+ |
website | string | no | Website URL |
phone | string | no | Phone number |
address | object | no | Address object with street, city, state, postal_code, country |
owner_id | string | no | Assigned team member |
metadata | object | no | Arbitrary key-value data |
curl -X POST "$REX_URL/companies" \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"domain": "acme.com",
"industry": "Technology",
"size": "51-200"
}'
{
"data": {
"id": "comp_01HQ...",
"name": "Acme Corp",
"domain": "acme.com",
"industry": "Technology",
"size": "51-200",
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
}
}
GET /companies
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | integer | Results per page (default 50, max 200) |
owner_id | string | Filter by owner |
industry | string | Filter by industry |
search | string | Search by name or domain |
curl "$REX_URL/companies?industry=Technology&limit=25" \
-H "X-Api-Key: $REX_API_KEY"
{
"data": [
{
"id": "comp_01HQ...",
"name": "Acme Corp",
"domain": "acme.com",
"industry": "Technology",
"size": "51-200",
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
}
],
"has_more": false
}
GET /companies/:id
curl "$REX_URL/companies/comp_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
{
"data": {
"id": "comp_01HQ...",
"name": "Acme Corp",
"domain": "acme.com",
"industry": "Technology",
"size": "51-200",
"website": "https://acme.com",
"phone": "+1-555-0200",
"address": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"owner_id": "user_01HQ...",
"parent_company_id": null,
"last_activity_at": "2026-03-15T14:30:00Z",
"days_since_last_activity": 1,
"metadata": {},
"relationships": {
"owner": { "type": "user", "id": "user_01HQ...", "name": "Jane Smith" }
},
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
},
"included": [
{ "type": "user", "id": "user_01HQ...", "name": "Jane Smith" }
]
}
PATCH /companies/:id
All fields from the create request body are accepted. Only provided fields are updated.
curl -X PATCH "$REX_URL/companies/comp_01HQ..." \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"size": "201-1000",
"industry": "Enterprise Software"
}'
Returns the full updated company in the same format as Get a company.
DELETE /companies/:id
curl -X DELETE "$REX_URL/companies/comp_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
204 No Content on success.
GET /companies/:id/contacts
Returns contacts linked to this company. Supports cursor and limit query parameters.
curl "$REX_URL/companies/comp_01HQ.../contacts" \
-H "X-Api-Key: $REX_API_KEY"
{
"data": [
{
"id": "cont_01HQ...",
"email": "ada@acme.com",
"first_name": "Ada",
"last_name": "Lovelace",
"stage": "customer",
"source": "organic",
"company_id": "comp_01HQ...",
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
}
],
"has_more": false
}
GET /companies/:id/deals
Returns deals linked to this company. Supports cursor and limit query parameters.
curl "$REX_URL/companies/comp_01HQ.../deals" \
-H "X-Api-Key: $REX_API_KEY"
{
"data": [
{
"id": "deal_01HQ...",
"name": "Acme Enterprise Plan",
"pipeline_id": "pipe_01HQ...",
"stage_id": "stg_01HQ...",
"value": 500000,
"currency": "USD",
"status": "open",
"company_id": "comp_01HQ...",
"created_at": "2026-03-16T12:00:00Z",
"updated_at": "2026-03-16T12:00:00Z"
}
],
"has_more": false
}