Skip to content

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

Custom Fields

Custom fields let you extend contacts and companies with additional data fields specific to your business. Define field schemas, then set values on individual records.

FieldTypeDescription
iduuidUnique identifier
account_iduuidAccount this field belongs to
entity_typestringcontact or company
labelstringDisplay label
field_typestringData type: text, number, date, boolean, enum
optionsstring[] | nullAllowed values (enum fields only)
requiredbooleanWhether the field is required
display_orderintegerSort order for UI display
created_atdatetimeCreation timestamp
TypeValue FormatExample
textString"Enterprise"
numberNumber42
dateYYYY-MM-DD string"2025-06-01"
booleanBooleantrue
enumString (from options)"gold"

Endpoint: custom-fields-list

FieldTypeRequiredDescription
entity_typestringNoFilter by entity type (contact or company)
Terminal window
curl -X POST https://api.driftwoodapp.com/api/custom-fields-list \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_type": "contact"}'

Endpoint: custom-fields-get

FieldTypeRequiredDescription
iduuidYesCustom field definition ID

Endpoint: custom-fields-create

FieldTypeRequiredDescription
entity_typestringYescontact or company
labelstringYesDisplay label
field_typestringYestext, number, date, boolean, or enum
optionsstring[]ConditionalRequired for enum fields
requiredbooleanNoDefault: false
display_orderintegerNoDefault: 0
Terminal window
curl -X POST https://api.driftwoodapp.com/api/custom-fields-create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "contact",
"label": "Tier",
"field_type": "enum",
"options": ["bronze", "silver", "gold", "platinum"],
"required": false,
"display_order": 1
}'

Endpoint: custom-fields-update

FieldTypeRequiredDescription
iduuidYesDefinition ID
labelstringNoNew label
optionsstring[]NoNew options (enum only)
requiredbooleanNoUpdate required flag
display_orderintegerNoUpdate sort order

Endpoint: custom-fields-delete

FieldTypeRequiredDescription
iduuidYesDefinition ID

When creating or updating contacts and companies, pass custom field values as a JSON object keyed by the field definition ID:

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",
"custom_fields": {
"field-def-uuid-for-tier": "gold",
"field-def-uuid-for-score": 95
}
}'
CodeDescription
custom_fields.invalid_requestMalformed request body
custom_fields.invalid_idInvalid UUID format
custom_fields.not_foundDefinition does not exist
custom_fields.invalid_entity_typeMust be: contact, company
custom_fields.label_requiredLabel is required
custom_fields.invalid_field_typeMust be: text, number, date, boolean, enum
custom_fields.options_requiredEnum fields require options
custom_fields.internalServer error