Overview
A webhook tells another system that something changed in Drum, as it happens. You subscribe an HTTPS endpoint to the events you care about, and Drum sends it a signed POST request each time one of those events happens in your account. Your system no longer has to poll the REST API to find out what changed.
| Request | POST with a JSON body, to an https URL on a public address |
| Events | 11, for projects, opportunities, invoices, costs, companies and event triggers |
| Signature | HMAC-SHA256 of the timestamp and raw body, in X-Webhook-Signature |
| Delivery | At least once. Up to 5 attempts, then a manual retry through the API |
| Who can set one up | A member with the manage_webhooks permission |
Get started
- Build an endpoint that accepts a
POSTover HTTPS and returns200quickly. - Create a subscription in Drum under Profile, then Webhooks, and choose its events. See Set up a webhook.
- Verify every request with the subscription’s secret. See Verify webhook signatures.
New to webhooks? Follow the tutorial Receive your first webhook. It takes about 15 minutes and needs only Python and a tunnel.
Events
| Event | Sent when |
|---|---|
project.created, project.updated |
A project or opportunity is created or changes |
project.completed |
A delivery project moves into a complete status |
opportunity.won, opportunity.lost |
An opportunity is won or lost |
invoice.created, invoice.updated |
An invoice is created or changes |
cost.created, cost.updated |
A cost is created or changes |
company.merged |
Duplicate companies are merged |
trigger.fired |
An event trigger with the Send Webhook action fires |
The rules for each event are in Events.
Reference
| Page | Covers |
|---|---|
| Events | Every event, when it fires, and how update events are combined |
| Payloads | The body of each event, field by field |
| Requests and signatures | Headers, the body envelope, and how the signature is built |
| Delivery and retries | Timeouts, retries, failures, auto-disable, duplicates and retention |
| Subscription endpoints | Manage subscriptions and read deliveries with the REST API |