Webhooks for your customers, sent once.
Send an event once, and coss.com signs, delivers and retries it to every endpoint your customers registered.
coss.hooks.messages.send()
const { : } = await ...(
{
: "customer_8812",
: "invoice.paid",
: {
: "in_1042",
: 4200,
: "usd",
},
},
{ : "invoice-1042-paid" },
);invoice.paid
Acme Corp, sent to 3 endpoints
- billing.acme.example200
- ledger.acme.example503. Attempt 1 of 8, next in 5 seconds.
- crm.acme.example200
Retries, then recovery
A failed delivery gets 8 attempts over about a day. After an outage, a recovery requeues whatever failed since a time you choose.
Read the docsinvoice.paid to ledger.acme.example
- 1 of 8at once503
- 2 of 85 seconds503
- 3 of 85 minutestimeout
- 4 of 830 minutes503
- 5 of 82 hours200
- 6 of 85 hoursnot needed
- 7 of 810 hoursnot needed
- 8 of 810 hoursnot needed
A portal your customers run themselves
They add endpoints, choose event types, roll secrets and retry deliveries, on a domain of its own.
Read the docsportal.cosshooks.com
https://billing.acme.example/hooksPOST /hooks
- webhook-id
- hmsg_01k7c8m4q2f3e9v6
- webhook-timestamp
- 1793809923
- webhook-signature
- v1,K5oZfzN95Z9UVu1EsfQ…
Signed the standard way
Standard Webhooks headers, and both secrets during a roll, so receivers keep working.
Read the docshttps://old.acme.example/hooks
- Day 1
- Day 2
- Day 3
- Day 4
- Day 5
disabled_reason: "failing"hook_endpoint.disabledFailing endpoints switch off
After 5 days of failing every attempt, the endpoint is disabled and you're told.
Read the docsPricing and limits
You pay per live message you send, once however many endpoints it goes to. Retries, recoveries, test sends and sandbox environments cost nothing. Full details in the docs.
PricingSee all plans
Hooks
$0.10per 1,000 messages
One per message whatever its fan-out; retries, recoveries and test sends are free
The Free plan includes
- 50,000 hooks messages a month
Paid plans start at $25/month, credited against usage.
Limits
- Signatures
- Standard Webhooks, HMAC-SHA256
- Attempts per delivery
- 8, over about a day
- Response timeout
- 15 seconds, any 2xx
- Payload size
- 256 KB of JSON
- Endpoints per application
- 50 live, 5 sandbox
- Requests per endpoint
- 20 per second, or its own limit
- Messages per second
- 50, bursts of 200
- Deliveries per day
- 100,000 per organization
- Auto-disable
- after 5 days of failures
- Portal session
- up to 24 hours
- Messages kept
- 30 days
Questions
A service that sends webhooks to your customers for you. With coss.com Hooks you send an event to one of your customers once, and coss.com delivers it to every URL they registered, signed, retried with backoff and logged.
In the Hooks portal, a ready-made page where one customer's users add endpoints, pick event types, reveal and roll secrets, and see and retry every delivery. Your backend creates a portal session and sends the user to its URL or embeds it in an iframe. You can also create endpoints for them with the API.
Every delivery carries Standard Webhooks headers (webhook-id, webhook-timestamp and webhook-signature, an HMAC-SHA256 with the endpoint's own secret). Any Standard Webhooks library verifies them, as does verifyWebhook from the coss package.
A failed delivery is retried with backoff for 8 attempts over roughly a day. An endpoint that keeps failing every attempt for 5 days is disabled and you get a hook_endpoint.disabled webhook. Once it is back, a recovery requeues every delivery that failed since a time you choose.
Yes. Creating an endpoint accepts an existing whsec_ secret of 24 to 64 bytes, so your customers' receivers keep verifying with the secret they already have.
No. The SDK sends an Idempotency-Key with every send and reuses it on retries, and you can pass your own key, so a retried send is delivered once. Receivers can still see a message more than once after delivery retries, and use webhook-id to skip duplicates.
Works with
On the same key, SDK, webhooks and logs: nothing more to set up.
Compared
Start with Hooks today.
Development keys record every request and event and deliver nothing.