Skip to content

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

Webhooks

Webhooks notify your application when events happen in Driftwood — contacts created, companies updated, activities logged, etc. Configure an HTTPS endpoint and select which events to subscribe to.

FieldTypeDescription
iduuidUnique identifier
account_iduuidAccount this webhook belongs to
created_byuuidUser who created it
urlstringYour HTTPS endpoint URL
descriptionstringDescription
secret_prefixstringFirst characters of the signing secret
eventsstring[]Events this webhook is subscribed to
is_activebooleanWhether the webhook is enabled
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp
EventDescription
contact.createdA contact was created
contact.updatedA contact was updated
contact.deletedA contact was deleted
company.createdA company was created
company.updatedA company was updated
company.deletedA company was deleted
activity.createdAn activity was created
activity.updatedAn activity was updated
activity.deletedAn activity was deleted
project.createdA project was created
project.updatedA project was updated
project.deletedA project was deleted

When an event occurs, Driftwood sends a POST request to your URL with:

{
"event": "contact.created",
"timestamp": "2025-06-15T14:30:00Z",
"data": {
"id": "550e8400-...",
"first_name": "Jane",
"last_name": "Smith",
...
}
}

Each webhook delivery includes a signature header for verification. Use your signing secret (returned at creation time) to validate that the payload came from Driftwood.

Endpoint: webhooks-create

FieldTypeRequiredDescription
urlstringYesYour HTTPS endpoint URL
descriptionstringNoDescription
eventsstring[]YesEvents to subscribe to
Terminal window
curl -X POST https://api.driftwoodapp.com/api/webhooks-create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/driftwood",
"description": "Sync contacts to our data warehouse",
"events": ["contact.created", "contact.updated", "contact.deleted"]
}'

Response:

{
"ok": true,
"result": {
"endpoint": {
"id": "880e8400-...",
"url": "https://your-app.com/webhooks/driftwood",
"events": ["contact.created", "contact.updated", "contact.deleted"],
"is_active": true
},
"signing_secret": "whsec_abc123..."
}
}

Endpoint: webhooks-list

Terminal window
curl -X POST https://api.driftwoodapp.com/api/webhooks-list \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Endpoint: webhooks-get

FieldTypeRequiredDescription
iduuidYesWebhook endpoint ID

Endpoint: webhooks-update

FieldTypeRequiredDescription
iduuidYesWebhook endpoint ID
urlstringNoNew URL
descriptionstringNoNew description
eventsstring[]NoNew event subscriptions
is_activebooleanNoEnable or disable

Endpoint: webhooks-delete

FieldTypeRequiredDescription
iduuidYesWebhook endpoint ID

See recent delivery attempts and their status.

Endpoint: webhooks-deliveries

FieldTypeRequiredDescription
endpoint_iduuidYesWebhook endpoint ID
limitintegerNoNumber of deliveries to return

Response:

{
"ok": true,
"result": {
"deliveries": [
{
"id": "990e8400-...",
"event_type": "contact.created",
"status": "delivered",
"http_status_code": 200,
"attempt_count": 1,
"completed_at": "2025-06-15T14:30:01Z",
"created_at": "2025-06-15T14:30:00Z"
}
]
}
}
StatusDescription
pendingNot yet delivered
deliveredSuccessfully delivered (2xx response)
failedAll delivery attempts failed
CodeDescription
webhooks.invalid_requestMalformed request body
webhooks.invalid_idInvalid UUID format
webhooks.not_foundWebhook does not exist
webhooks.url_requiredURL is required
webhooks.invalid_urlURL must be a valid HTTPS URL
webhooks.internalServer error