Skip to content

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 for the webhook endpoint
account_iduuidID of the account that owns the endpoint
created_byuuidID of the user who created the endpoint
urlstringDestination URL that event payloads are POSTed to
descriptionstringFree-form description of the endpoint
secret_prefixstringNon-sensitive prefix of the signing secret, shown for identification
eventsstring[]Event types this endpoint subscribes to; an empty list receives all events One of: contact.created, contact.updated, contact.deleted, company.created, company.updated, company.deleted, project.created, project.updated, project.deleted, deal.created, deal.updated, deal.deleted, partnership.created, partnership.updated, partnership.deleted, activity.created, activity.updated, activity.deleted, source.created, source.updated, source.archived
is_activeboolWhether the endpoint is active and will receive deliveries
created_atdatetimeTimestamp the endpoint was created, ISO 8601
updated_atdatetimeTimestamp the endpoint was last updated, ISO 8601

Endpoint: webhooks-create

FieldTypeRequiredDescription
urlstringYesDestination URL that event payloads will be POSTed to; must start with http:// or https://
descriptionstringNoFree-form description of the endpoint
eventsstring[]YesEvent types to subscribe to; an empty list subscribes to all events One of: contact.created, contact.updated, contact.deleted, company.created, company.updated, company.deleted, project.created, project.updated, project.deleted, deal.created, deal.updated, deal.deleted, partnership.created, partnership.updated, partnership.deleted, activity.created, activity.updated, activity.deleted, source.created, source.updated, source.archived
Terminal window
curl -X POST https://api.driftwoodapp.com/api/webhooks-create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "...", "events": []}'

Endpoint: webhooks-delete

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

Endpoint: webhooks-deliveries

FieldTypeRequiredDescription
endpoint_idstringYesID of the webhook endpoint whose deliveries to list
limitintNoMaximum number of delivery records to return
Terminal window
curl -X POST https://api.driftwoodapp.com/api/webhooks-deliveries \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"endpoint_id": "..."}'

Endpoint: webhooks-get

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

Endpoint: webhooks-list

Endpoint: webhooks-update

FieldTypeRequiredDescription
idstringYesID of the webhook endpoint to update
urlstring?NoUpdated destination URL; must start with http:// or https://
descriptionstring?NoUpdated description of the endpoint
eventsstring[]NoReplacement list of subscribed event types One of: contact.created, contact.updated, contact.deleted, company.created, company.updated, company.deleted, project.created, project.updated, project.deleted, deal.created, deal.updated, deal.deleted, partnership.created, partnership.updated, partnership.deleted, activity.created, activity.updated, activity.deleted, source.created, source.updated, source.archived
is_activebool?NoWhether the endpoint is active and should receive deliveries
Terminal window
curl -X POST https://api.driftwoodapp.com/api/webhooks-update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "..."}'
CodeDescription
webhooks.url_requiredUrl required
webhooks.invalid_urlInvalid url
webhooks.invalid_idInvalid id
webhooks.not_foundNot found