# Testing (/docs/webhooks/testing) Send a test event, catch a real delivery on your machine, and fix the usual failures. Test a webhook receiver in two steps. First send a signed sample to prove your verifier and parser. Then catch one real delivery and replay it offline. ## Send a test event An event webhook endpoint can be sent a signed sample of any type it subscribes to. The call is free. ```bash title="cURL" curl -X POST "https://www.socialcrawl.dev/v1/webhook-endpoints/we_V1StGXR8Z5jdHi6BmyT/test" \ -H "x-api-key: sc_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "type": "discover.completed" }' ``` ```json title="Response" { "success": true, "data": { "type": "discover.completed", "attempt": { "id": "wat_...", "delivery_id": "msg_...", "test": true, "status": 200, "outcome": "delivered", "duration_ms": 142, "response_excerpt": "ok", "error": null, "created_at": "2026-10-19T10:00:01.000Z" }, "next_step": "The receiver answered 2xx. Real events are delivered the same way, in batches, signed per attempt." }, "credits_used": 0, "request_id": "req_..." } ``` Leave out `type` to get the first type the endpoint subscribes to. The sample event carries `"test": true` and `"cursor": null`, so your code can tell it apart. A test is sent once and never retried. It does not enter the events feed and does not change the endpoint's health, so a test answered `410` does not disable it. Monitor, billing, batch and status webhooks have no test call. Use the next section for those. ## Test on your machine [#test-on-your-machine] A loopback or private URL is refused when you register it, so your receiver needs a public HTTPS hostname. A tunnel works, and so does a hosted request inspector. 1. Expose your handler on a public HTTPS hostname and register that URL. 2. Trigger one real delivery you control. For a Monitor, create a throwaway hourly Monitor on a cheap call such as `tiktok/profile`, and pass your own `webhook_secret` so a fixture can hold it. For billing, set a low-credit threshold just under your balance and make one billed call. 3. Capture the raw body and the signature headers. Replay them against your verifier offline, which takes the network out of the loop. 4. Read what your endpoint answered. Event webhooks list each attempt at `GET /v1/webhook-endpoints/{id}/attempts`. A Monitor run carries `webhook_delivery` on `GET /v1/monitors/{monitor_id}/runs`. 5. Delete the throwaway Monitor, or pause it, so it stops billing. ## Troubleshooting [#troubleshooting] **Every signature check fails** You are almost certainly verifying a re-serialized body. Capture the raw bytes before any JSON middleware touches them. For `x-socialcrawl-signature`, hash `.` with `t` read from the header, not from your clock. If you saved a billing URL again or rotated an endpoint's secret, use the new secret. The [verifiers and test vectors](/docs/webhooks/verify.md) settle which side is wrong. **Nothing arrives** For a Monitor, check the run status first: `failed` and `skipped` runs never deliver. With `suppress_webhook_unless_alert` set, a run with no fired alert is silent by design. For an event webhook, check its `types` and `subject_ids`, then read `GET /v1/webhook-endpoints/{id}/attempts` for your receiver's answers. A run that answered inside your original `GET` call sends no event. **I get the same delivery twice** Duplicates are expected, because every push channel delivers at least once and a late `2xx` causes a retry. Keep the id each channel names on [Verify a signature](/docs/webhooks/verify.md#de-duplicate-on-the-id) and skip one you have seen. **The endpoint was disabled** An event webhook endpoint is disabled when it answers `410`, after a long run of failed attempts, or when its API key is revoked. You get an `endpoint.disabled` event and an email with the reason. Fix the receiver, then send `PATCH /v1/webhook-endpoints/{id}` with `{ "status": "enabled" }`. Events created while it was disabled are not sent again; read them from the [events feed](/docs/events.md). ## Next steps - [Verify a signature](/docs/webhooks/verify.md): Node and Python verifiers with fixed test vectors. - [Event types](/docs/webhooks/events.md): What each event