How webhooks work
- An event occurs in HoopAI (e.g., contact created, appointment booked)
- HoopAI sends a
POSTrequest to your registered webhook URL - Your app processes the event and responds with a
2xxstatus code - If your endpoint doesn’t respond with
2xx, HoopAI retries the delivery
Setting up webhooks
For marketplace apps
Register webhook subscriptions when your OAuth app is installed. Use the App Marketplace developer portal to configure which events your app listens to.For private integrations
Available events
| Event | Trigger |
|---|---|
ContactCreate | A new contact is created |
ContactUpdate | A contact is updated |
ContactDelete | A contact is deleted |
ContactTagUpdate | Tags are added or removed from a contact |
ContactDndUpdate | Do-not-disturb settings change |
AppointmentCreate | An appointment is booked |
AppointmentUpdate | An appointment is modified |
AppointmentDelete | An appointment is cancelled |
OpportunityCreate | A new opportunity is created |
OpportunityUpdate | An opportunity is updated |
OpportunityStageUpdate | An opportunity moves to a new pipeline stage |
InvoiceCreate | An invoice is created |
InvoicePaid | An invoice is fully paid |
InboundMessage | A message is received from a contact |
OutboundMessage | A message is sent to a contact |
NoteCreate | A note is added to a contact |
TaskCreate | A task is created |
Webhook payload structure
Every webhook payload follows this structure:| Field | Description |
|---|---|
type | The event name (e.g., ContactCreate) |
locationId | The account where the event occurred |
body | The event payload with resource data |
Verifying webhook signatures
Always verify that incoming webhooks are genuinely from HoopAI by checking the signature header.Best practices
Respond quickly
Respond quickly
Return a
2xx status code within 5 seconds. If your processing takes longer, accept the webhook and process it asynchronously (e.g., with a queue).Handle duplicates
Handle duplicates
Webhooks may be delivered more than once. Use the event ID or resource ID to deduplicate in your handler.
Use HTTPS
Use HTTPS
Always use HTTPS endpoints for webhook URLs to ensure payloads are encrypted in transit.
Monitor failures
Monitor failures
Track webhook delivery failures and set up alerts. If your endpoint is down, events will be retried but eventually dropped.
.png?fit=max&auto=format&n=EQK5eX9kTD8NzWwA&q=85&s=878008bf159fcc4964d0c0d508b6e400)