Intercom webhooks: configure and verify an event
Set up an Intercom event and destination, check authentication and retries, then verify the received record using fictional data.
- Published
- Last updated
Intercom webhooks send event notifications to your HTTPS endpoint so another system can act on a support event. Subscribe to the required topic, authenticate each delivery and save it before acknowledging receipt. Then verify the destination record, including what happens when the same notification arrives again.
A webhook supplies the event. Your receiving application must decide which record to update and prevent repeated deliveries from repeating the business action.
Choose the support event and destination
Choose the topic that describes the support action, then define the exact destination change. For example, a retailer can record that a customer conversation closed without marking an unrelated order as refunded.
Intercom’s webhook topic reference lists conversation.admin.closed for an admin closing a conversation. It requires Read conversations. Use that topic for the example below, with a destination support record matched by conversation identifier.
Write the expected result before configuring the subscription. For a fictional conversation conv-test-41, the receiving workflow will mark its linked test support record as closed. A missing association will enter a review queue. It will leave order and payment records unchanged.
Use the webhook overview to distinguish the notification identifier from the object being reported. Keep the notification’s id for delivery tracking and the conversation identifier for matching the destination. A new event for the same conversation is different from a repeated delivery of one event.
Prepare an isolated Intercom test app or workspace and a receiving test environment. Give the destination service account access only to the support records and fields the workflow changes. If the receiver fetches more details from Intercom, grant only the permissions required for that additional request.
Follow Intercom’s webhook setup instructions in this order.
- Open the intended app in Developer Hub. Under Configure, select Webhooks.
- Enter the full HTTPS endpoint URL. It must accept the HEAD request Intercom uses to validate it, then receive event POST requests.
- Select the topic and inspect its required permissions. Add the corresponding permission on the app’s Authentication page when needed.
- Save the subscription and confirm the app is installed in the intended workspace. Public app installations require the user’s permission grant.
Subscriptions belong to the app and receive events from its installed workspaces. Route each workspace to its own destination before accepting customer events. A shared endpoint must never infer the tenant from a customer-supplied email address.
Record the configured API version alongside your parser. Use the selected topic’s documented payload shape, then inspect a fictional delivery before mapping fields. Don’t assume a ticket event and a conversation event put equivalent fields in the same place.
Configure authentication and delivery handling
Verify the webhook signature against the raw request body before parsing or processing the event. Intercom’s topic reference specifies X-Hub-Signature, formed from sha1= and an HMAC-SHA1 hexadecimal digest using the app’s client_secret.
Keep the secret on the receiving server. Compare signatures using a constant-time comparison and reject missing or invalid signatures. Parsing JSON and rebuilding it before verification can change the bytes, so preserve the original body for this step.
Implement the receiving path in this order.
- Verify the signature and validate the event against the expected app and topic. Route only to an authorised destination.
- Save the accepted notification durably with a unique identifier. A queue or event store must survive a process restart.
- Return HTTP 200 promptly after that save. Run slower destination work separately.
- Apply the destination change once. Store the resulting destination identifier and processing status with the event.
- On a repeated delivery, find the existing event and acknowledge it without repeating a completed action. Resume failed work through the processing queue.
This is idempotency: processing the same event again leaves the business result unchanged. Enforce it across concurrent requests, not just consecutive requests. Where the destination supports idempotency tokens, use the same token for every attempt at that event’s write.
Intercom’s delivery guide warns that notifications can arrive out of order and duplicate when acknowledgement takes longer than five seconds. Compare event times when updating state. An older close event must not overwrite a later reopen.
The topic reference distinguishes delivery outcomes.
| Receiver outcome | Documented Intercom behaviour | Receiver action |
|---|---|---|
| 2xx | Delivery succeeds | Use 200 after durable acceptance |
| Timeout | One retry after one minute | Inspect whether the first event was saved before retrying work |
| 410 | Subscription is disabled | Reserve this response for an intentionally removed endpoint |
| 429 | Delivery is throttled, with notifications dropped after the documented two-hour window | Restore capacity and reconcile missing events |
| Other 4xx or 5xx | Retry after one minute, with failed delivery recorded if the next attempt fails | Fix the cause and use a controlled recovery path |
A 200 response transfers responsibility to your receiver. If the later destination write fails, your queue must retain the event for recovery. Monitor accepted events that have no completed destination update.
Verify receipt and the resulting record
Use fictional records to prove that receipt produces the intended support update once. Keep the same event identifier when testing a repeated delivery, and use a new identifier for a genuinely new event.
Run these cases in your isolated environments.
| Fictional case | Input or fault | Observable destination result |
|---|---|---|
| Successful close | An authenticated close event for conv-test-41 | Its linked test support record is closed and the event is completed |
| Duplicate delivery | The same notification arrives twice, including concurrently | One completed update and one event record, with both deliveries acknowledged |
| Invalid signature | A fictional request fails signature verification | No queued work and no destination change |
| Temporary destination failure | The receiver saves an event, but the destination rejects its write | The event remains pending or failed, then completes once after controlled retry |
| Missing destination association | An event names an unlinked fictional conversation | The event enters review and unrelated records stay unchanged |
| Out-of-order event | An older close arrives after a newer reopen | The later destination state survives |
For each case, inspect the saved destination after reloading it. Compare its source conversation identifier and status with the event record. A delivery dashboard showing success confirms the HTTP exchange, while the destination proves the business action.
Keep logs limited to notification identifiers, processing outcomes and a redacted destination reference. Exclude signatures and secrets, customer messages and contact details. Restrict access to retained payloads and define how long the receiver keeps them.
For safe replay, find the failed event in the receiver’s durable store and inspect the destination before reprocessing. If the original write succeeded but its acknowledgement failed, reconcile that result instead of creating another record. Apply the same idempotency rule during recovery.
If events stop arriving, inspect the subscription and its permission scopes before changing the receiver. The delivery guide describes paused or suspended subscriptions after sustained errors. Repair the endpoint first, then resume a suspended private-app subscription with Set live in Developer Hub.
Enable customer traffic once the expected record changes survive retries and duplicates, and failed events remain visible to an assigned operator. Keep a reconciliation process for missing deliveries because provider retries have finite limits.
Give your store its own shopping agent
Customers ask in their own words. Your agent finds, compares and checks out from your catalogue, right on your site.