Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Contacts

Contacts are the core records in Driftwood — the people your team interacts with. Contacts can be associated with companies, tagged, and have custom fields.

FieldTypeDescription
iduuidUnique identifier
account_iduuidAccount this contact belongs to
created_byuuidUser who created the contact
first_namestringFirst name
last_namestringLast name
emailstringEmail address
phonestringPhone number
company_iduuid | nullAssociated company ID
company_namestringCompany name (read-only, computed)
job_titlestringJob title
addressstringStreet address
citystringCity
statestringState/province
zip_codestringZIP/postal code
countrystringCountry
notesstringFree-text notes
tagsstring[]Array of tag strings
source_iduuid | nullLead source ID
source_namestringSource name (read-only, computed)
custom_fieldsobjectCustom field values keyed by field definition ID
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp

Search and filter contacts with cursor-based pagination.

Endpoint: contacts-list

Parameters:

FieldTypeRequiredDescription
searchstringNoSearch across name, email, phone, company name
tagsstring[]NoFilter by tags (contacts must have all specified tags)
company_iduuidNoFilter by company
company_idsuuid[]NoFilter by multiple companies
source_idsuuid[]NoFilter by sources
cursorstringNoPagination cursor
limitintegerNoResults per page (default 25)

Example:

Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-list \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"search": "jane",
"tags": ["vip"],
"limit": 10
}'

Response:

{
"ok": true,
"result": {
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"phone": "+1-555-0100",
"company_id": "660e8400-e29b-41d4-a716-446655440001",
"company_name": "Acme Corp",
"job_title": "VP of Engineering",
"tags": ["vip", "enterprise"],
"source_name": "Website",
"custom_fields": {},
"created_at": "2025-06-01T12:00:00Z",
"updated_at": "2025-06-01T12:00:00Z"
}
],
"next_cursor": ""
}
}

Endpoint: contacts-get

FieldTypeRequiredDescription
iduuidYesContact ID
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-get \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "550e8400-e29b-41d4-a716-446655440000"}'

Endpoint: contacts-create

FieldTypeRequiredDescription
first_namestringYesFirst name
last_namestringNoLast name
emailstringNoEmail address
phonestringNoPhone number
company_iduuidNoAssociate with a company
job_titlestringNoJob title
addressstringNoStreet address
citystringNoCity
statestringNoState/province
zip_codestringNoZIP/postal code
countrystringNoCountry
notesstringNoNotes
tagsstring[]NoTags
source_iduuidNoLead source
custom_fieldsobjectNoCustom field values
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"company_id": "660e8400-e29b-41d4-a716-446655440001",
"tags": ["prospect"]
}'

Partial updates — only include fields you want to change.

Endpoint: contacts-update

FieldTypeRequiredDescription
iduuidYesContact ID
All other fields from createNoFields to update
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "550e8400-e29b-41d4-a716-446655440000",
"tags": ["vip", "enterprise"],
"job_title": "CTO"
}'

Endpoint: contacts-delete

FieldTypeRequiredDescription
iduuidYesContact ID
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "550e8400-e29b-41d4-a716-446655440000"}'

Response:

{
"ok": true,
"result": {
"deleted": true
}
}
CodeDescription
contacts.invalid_requestMalformed request body
contacts.invalid_idInvalid UUID format
contacts.not_foundContact does not exist
contacts.first_name_requiredFirst name is required for creation
contacts.invalid_company_idReferenced company does not exist
contacts.invalid_source_idReferenced source does not exist
contacts.invalid_custom_fieldsCustom field values don’t match definitions
contacts.internalServer error