Oyster webhooks
Oyster webhooks are JSON POST requests the Oyster platform sends to an endpoint you register through its API when something happens in hiring, contracts, expenses, time off, invoicing, payroll and more.
How Oyster webhooks work
Webhooks push changes to you, so you don't have to keep polling the Oyster API. You register an endpoint with POST /v1/webhooks, using an access token for the company that owns your Developer Application, and Oyster starts sending events to it. That call takes only a url and a sharedSecret, with no list of events, so your handler decides which ones to act on.
Each delivery has an eventName, usually namespace.event_name such as expenses.expense_approved, along with eventTimestamp, an id prefixed wh_, companyId and a data object. Oyster's schemas show data holding IDs and a few status fields rather than the whole record, so fetch the rest from the API. Oyster documents no payload versioning.
Key facts
Setting up Oyster webhooks
- Create an endpoint with
POST https://api.oysterhr.com/v1/webhooks, sendingurlandsharedSecret. The access token needs thesubscribescope. Keep the ID it returns: you need it to update or delete the endpoint. - Send a test with
POST /v1/webhooks/{id}/testand adataobject of your own, or request a developer sandbox, whose API is atapi-sandbox.oysterhr.com. -
GET /v1/webhooks/dispatcheslists dispatches with each one's last response code and retry count. Oyster documents no way to resend one. - To receive through Event Gateway, create a source with the Oyster type, enter your
sharedSecretin its Shared Secret field, with or without theBearerprefix, and register the source URL asurl.
Delivery behaviour
5 seconds without a 200 by then, Oyster counts the dispatch as failed Retries up to 9 attempts over about 48 hours, with gaps growing from 30 seconds to 1 day, plus jitter After retries not documented Oyster describes no resend, and doesn't say if failures disable an endpoint Duplicates possible Oyster says webhooks may arrive more than once, so dedupe on id Known failure modes
From Hookdeck's Oyster guide →-
A slow handler triggers retries
Oyster treats anything other than a
Answer inside the 5 seconds →200within 5 seconds as a failed dispatch and tries again later. Respond first and do the work in a background job. -
The same webhook arrives twice
Oyster can deliver a webhook more than once. Store each
Deduplicate on id →id, which is prefixedwh_, before you process it and skip repeats. -
An older event lands after a newer one
Retries run for about 48 hours, so an older event can arrive after a newer one. Compare
Handle events out of order →eventTimestampwith the state you last stored before applying a change. -
Someone learns the shared secret
Oyster repeats the same bearer value on every request and signs nothing, so anyone with the secret can send a convincing event. Keep it out of logs, and rotate it with
Limit what a leaked secret can do →PATCH /v1/webhooks/{id}if it may have leaked.
Oyster webhook best practices
- Answer with a 200 inside 5 seconds. Check the header, store the event and respond, then do the work in a background job.
- Deduplicate on id.
Oyster says deliveries can repeat. Store each
idbefore processing and skip repeats. - Check eventTimestamp before applying a change. A retry can land after a newer event, so skip anything older than the state you hold.
- Filter on eventName in your handler.
Creating an endpoint takes no list of events. Route on the namespace, and answer
200to events you ignore so they aren't retried. - Re-read sensitive records from the API.
Nothing signs the body, so fetch the record by the IDs in
databefore acting on an event such as a terminated engagement. - Match companyId first if you're a partner.
Partners use
companyIdto find the customer an event belongs to.
Common Oyster webhook events
Hiring
hiring.employment_engaged | Employment reaches the engaged stage |
hiring.contractor_engaged | Contractor reaches the engaged stage |
hiring.agreement_signed | Hiring agreement is signed; data names its type |
offboarding.engagement_terminated | Engagement ends; data has the termination ID and state |
Expenses and time
expenses.expense_approved | Expense is approved; data has new and previous review state |
time_off.request_status_changed | Time off request moves to a new status |
time_tracking.time_sheet_approved | Time sheet gets approval |
Money
invoicing.invoice_issued | Invoice goes out; data has its reference code and type |
payments.charge_paid | Charge is settled; data has its ID |
payments.charge_failed | Charge ends in failure |
engagements.payslip_uploaded | New payslip is added; data identifies it and its subject |
Events by resource
| Resource | Events | Payloads |
|---|---|---|
hiring | 17 | 0 |
invoicing | 12 | 0 |
time_tracking | 10 | 0 |
offboarding | 9 | 0 |
payments | 9 | 0 |
benefits | 8 | 0 |
contract | 8 | 0 |
engagements | 7 | 0 |
expenses | 4 | 0 |
identity_verification | 4 | 0 |
3 more resources, including Other Oyster events. All 97 events →
In this hub
| Webhook events → | Every covered Oyster event, with payloads where the registry has them. |
| MCP events → | How an agent subscribes to Oyster events as MCP events. |
| Verify signatures → | Signature facts, verification code and common failures. |
| Production guide → | Production problems, such as timeouts and retries, and how to handle them. |
| Agent skill → | Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill oyster-webhooks |
Keep a slow HR system from setting off Oyster's retries.
Event Gateway checks the shared secret, answers Oyster inside the 5-second window and queues each event, so your service can process it on its own schedule.