Companies
Companies represent organizations your team works with. Contacts can be linked to companies, and projects can be associated with companies.
The Company Object
Section titled “The Company Object”| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier |
account_id | uuid | Account this company belongs to |
created_by | uuid | User who created the company |
name | string | Company name |
domain | string | Primary domain (e.g., acme.com) |
industry | string | Industry |
notes | string | Free-text notes |
phone | string | Phone number |
website | string | Website URL |
linkedin_url | string | LinkedIn profile URL |
address | string | Street address |
city | string | City |
state | string | State/province |
zip_code | string | ZIP/postal code |
country | string | Country |
employee_count | integer | null | Number of employees |
annual_revenue | integer | null | Annual revenue in cents |
tags | string[] | Array of tag strings |
custom_fields | object | Custom field values keyed by field definition ID |
created_at | datetime | Creation timestamp |
updated_at | datetime | Last update timestamp |
List Companies
Section titled “List Companies”Endpoint: companies-list
| Field | Type | Required | Description |
|---|---|---|---|
search | string | No | Search by name, domain |
tags | string[] | No | Filter by tags |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page (default 25) |
curl -X POST https://api.driftwoodapp.com/api/companies-list \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"search": "acme", "limit": 10}'Response:
{ "ok": true, "result": { "items": [ { "id": "660e8400-e29b-41d4-a716-446655440001", "name": "Acme Corp", "domain": "acme.com", "industry": "Technology", "employee_count": 500, "annual_revenue": 5000000000, "tags": ["enterprise"], "custom_fields": {}, "created_at": "2025-06-01T12:00:00Z", "updated_at": "2025-06-01T12:00:00Z" } ], "next_cursor": "" }}Get Company
Section titled “Get Company”Endpoint: companies-get
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Company ID |
curl -X POST https://api.driftwoodapp.com/api/companies-get \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "660e8400-e29b-41d4-a716-446655440001"}'Create Company
Section titled “Create Company”Endpoint: companies-create
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Company name |
domain | string | No | Primary domain |
industry | string | No | Industry |
notes | string | No | Notes |
phone | string | No | Phone number |
website | string | No | Website URL |
linkedin_url | string | No | LinkedIn URL |
address | string | No | Street address |
city | string | No | City |
state | string | No | State/province |
zip_code | string | No | ZIP/postal code |
country | string | No | Country |
employee_count | integer | No | Number of employees |
annual_revenue | integer | No | Annual revenue in cents |
tags | string[] | No | Tags |
custom_fields | object | No | Custom field values |
curl -X POST https://api.driftwoodapp.com/api/companies-create \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme Corp", "domain": "acme.com", "industry": "Technology", "employee_count": 500, "tags": ["enterprise"] }'Update Company
Section titled “Update Company”Partial updates — only include fields to change.
Endpoint: companies-update
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Company ID |
| All other fields from create | No | Fields to update |
curl -X POST https://api.driftwoodapp.com/api/companies-update \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "id": "660e8400-e29b-41d4-a716-446655440001", "employee_count": 600 }'Delete Company
Section titled “Delete Company”Endpoint: companies-delete
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Company ID |
curl -X POST https://api.driftwoodapp.com/api/companies-delete \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "660e8400-e29b-41d4-a716-446655440001"}'Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
companies.invalid_request | Malformed request body |
companies.invalid_id | Invalid UUID format |
companies.not_found | Company does not exist |
companies.invalid_custom_fields | Custom field values don’t match definitions |
companies.internal | Server error |