Adding an endpoint
1
Get an address from the other system
In Zapier, make a Zap that starts with Webhooks by Zapier → Catch Hook and copy the address it gives you. In Make, use a Custom webhook. Your own code needs an https address that accepts a POST.
2
Add it
Press Add an endpoint. In the New endpoint card, give it a Label, such as Zapier: new adoptions, and paste the Address.
3
Choose what it hears about
Tick the workspaces and the changes it should be sent. Leave a group with nothing ticked to be sent all of them. Press Add endpoint.
4
Copy the signing secret
The signing secret is shown once. Copy it if your own code will check messages, then press I’ve saved it.
5
Test it
Press Test on the endpoint and read the answer under it.
An organization can have up to 20 endpoints. Add an endpoint is greyed out once you have 20.
The page does not edit an endpoint’s address or choices once it is added. To change them, add a new endpoint and remove the old one.
The signing secret
The signing secret is what proves a message came from RescueConsole. It is shown once, when the endpoint is added and each time it is rotated, in a panel headed Copy the signing secret for “Zapier: new adoptions” now. This is the only time it is shown. It startswhsec_.
Zapier and Make do not need it. Your own code should use it to check the signature on every message. If it is lost, rotate it and paste the new one where your code keeps it.
Each endpoint
Each endpoint in the list shows its label, its address, which workspaces and changes it is sent, and the last delivery: when, the answer it gave (such as HTTP 200), and how many deliveries have failed in a row. Nothing delivered yet means just that.What is sent
Each change is sent as a POST with a JSON body:
A test message has
type set to ping, and data.after holds a message saying the endpoint works.
Every message also carries these headers:
Checking the signature
TheX-RescueConsole-Signature header looks like t=1789740202,v1=5f0c…, where t is the time the message was signed, in seconds since 1970, and v1 is the signature. It is the same scheme Stripe uses for its webhooks.
To check it:
- Split the header on commas, and each part on its first
=. Taket, and everyv1. - Refuse the message if
tis more than 300 seconds (five minutes) from your own clock. - Work out the HMAC-SHA256 of
t, a full stop, and the body exactly as it arrived, using the whole signing secret (withwhsec_) as the key. Write the result as lower-case hex. - Accept the message if it equals a
v1. Compare in constant time.
Deliveries and retries
A delivery counts as delivered when your endpoint answers with a 2xx status within 10 seconds. Anything else fails: a redirect is not followed, a 4xx or 5xx is recorded with its code, and no answer is recorded as No response within 10 seconds. A failed delivery is tried again up to five more times, waiting longer each time: about a minute, then about two, four, eight and sixteen minutes. An endpoint that has already taken a change is not sent it again when a try is repeated for another endpoint’s sake. After 20 failed deliveries in a row, the endpoint is switched off and the reason is written under it: Switched off after 20 failed deliveries in a row. The last was: and the last error. Nothing more is sent to it until you fix the other end and press Switch on, which also clears the count.Recent deliveries
Press Recent deliveries under an endpoint to see its last 50 deliveries, newest first.
Press Hide recent deliveries to fold it away.