Skip to content

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 of the contact (UUID).
account_iduuidID of the account that owns this contact (UUID).
created_byuuidID of the user who created this contact (UUID).
first_namestringContact’s first name.
last_namestringContact’s last name.
emailstringContact’s email address.
phonestringContact’s phone number.
company_iduuid?ID of the company this contact belongs to (UUID), or null if unassigned.
company_namestringName of the associated company, joined from the companies table (read-only).
job_titlestringContact’s job title.
addressstringStreet address.
citystringCity.
statestringState or province.
zip_codestringPostal or ZIP code.
countrystringCountry.
notesstringFree-form notes about the contact.
tagsstring[]Tags associated with the contact; normalized to lowercase, trimmed, and deduplicated.
source_iduuid?ID of the source this contact came from (UUID), or null if unassigned.
source_namestringName of the associated source, joined from the sources table (read-only).
custom_fieldsobjectCustom field values as a JSON object, validated against the account’s contact custom field definitions.
created_atdatetimeTimestamp when the contact was created (ISO 8601).
updated_atdatetimeTimestamp when the contact was last updated (ISO 8601).

Endpoint: contacts-create

FieldTypeRequiredDescription
first_namestringYesContact’s first name. Required and must be non-empty.
last_namestringNoContact’s last name.
emailstringNoContact’s email address.
phonestringNoContact’s phone number.
company_idstring?NoID of the company to associate (UUID).
job_titlestringNoContact’s job title.
addressstringNoStreet address.
citystringNoCity.
statestringNoState or province.
zip_codestringNoPostal or ZIP code.
countrystringNoCountry.
notesstringNoFree-form notes about the contact.
tagsstring[]NoTags to assign; normalized to lowercase, trimmed, and deduplicated.
source_idstring?NoID of the source to associate (UUID).
custom_fieldsobject?NoCustom field values as a JSON object, validated against the account’s contact custom field definitions.
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": "..."}'

Endpoint: contacts-delete

FieldTypeRequiredDescription
idstringYesID of the contact to delete (UUID).
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "..."}'

Endpoint: contacts-get

FieldTypeRequiredDescription
idstringYesID of the contact to retrieve (UUID).
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-get \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "..."}'

List contacts with filtering and pagination

Section titled “List contacts with filtering and pagination”

Endpoint: contacts-list

FieldTypeRequiredDescription
searchstringNoFull-text search query matched against contact fields.
tagsstring[]NoFilter to contacts that have all of these tags; normalized to lowercase, trimmed, and deduplicated.
company_idstring?NoFilter to contacts belonging to this company (UUID).
company_idsstring[]NoFilter to contacts belonging to any of these companies (UUIDs).
source_idsstring[]NoFilter to contacts from any of these sources (UUIDs).
cursorstringNoOpaque pagination cursor from a previous response’s next_cursor.
limitintNoMaximum number of contacts to return per page.
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-list \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Endpoint: contacts-update

FieldTypeRequiredDescription
idstringYesID of the contact to update (UUID). Required.
first_namestring?NoNew first name. Omit to leave unchanged.
last_namestring?NoNew last name. Omit to leave unchanged.
emailstring?NoNew email address. Omit to leave unchanged.
phonestring?NoNew phone number. Omit to leave unchanged.
company_idstring?NoNew associated company ID (UUID). Omit to leave unchanged.
job_titlestring?NoNew job title. Omit to leave unchanged.
addressstring?NoNew street address. Omit to leave unchanged.
citystring?NoNew city. Omit to leave unchanged.
statestring?NoNew state or province. Omit to leave unchanged.
zip_codestring?NoNew postal or ZIP code. Omit to leave unchanged.
countrystring?NoNew country. Omit to leave unchanged.
notesstring?NoNew notes. Omit to leave unchanged.
tagsstring[]NoReplacement set of tags; normalized to lowercase, trimmed, and deduplicated. Omit to leave unchanged.
source_idstring?NoNew associated source ID (UUID); pass an empty string to clear. Omit to leave unchanged.
custom_fieldsobject?NoCustom field values to merge onto existing values, validated against the account’s contact custom field definitions. Omit to leave unchanged.
Terminal window
curl -X POST https://api.driftwoodapp.com/api/contacts-update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "..."}'
CodeDescription
contacts.invalid_requestinvalid request body
contacts.first_name_requiredfirst name is required
contacts.invalid_company_idinvalid company ID
contacts.invalid_source_idinvalid source ID
contacts.invalid_custom_fieldscustom field validation failed
contacts.invalid_idinvalid contact ID
contacts.not_foundcontact not found