Add an endpoint
Your firm’s owner or an admin adds endpoints in the Melso console, under Settings › Developers › Webhooks, or with Create a webhook endpoint:secret appears only in this answer. Store it to verify signatures. An
endpoint receives the events of every company of your firm.
The event object
Event types
Subscribe to a whole family with a wildcard, such as
tax_return.*.
Verify the signature
Every request carries aMelso-Signature header:
v1 is the HMAC-SHA256 of t, a . and the raw request body, keyed with the
endpoint’s secret. Compare it in constant time, and refuse a t older than five
minutes.
Respond, retries and order
- Answer
2xxwithin 10 seconds, then do the work. Anything else is a failure. - Melso retries a failed event with exponential backoff for 3 days. An endpoint that keeps failing is disabled, and the firm’s owner and admins get an email.
- Events can arrive more than once and out of order. Use
idto skip duplicates, and read the current state with the object’s GET endpoint when order matters.
Replay and reconcile
List events returns the last 30 days of events for your firm, newest first. Filter bytype, company_id or
created_after. Use it to rebuild what an outage missed, or instead of
webhooks if you prefer polling.