Send an event again API
Queue an event that was not delivered (a dead letter, usually) for a fresh chain of attempts.
POST /v1/monitors/events/{event_id}/redeliver
POST /v1/monitors/events/{event_id}/redeliver
Queue an event that was not delivered (a dead letter, usually) for a fresh chain of attempts. An event already delivered is refused. Free.
- Cost: Free
- Cache: Not cached.
Parameters#
| Name | Type | Required | Description | In |
|---|---|---|---|---|
event_id | string | yes | Event id. | path |
Example request#
Set your key in the environment first (see Authentication).
1curl -X POST "https://api.socialscrape.dev/v1/monitors/events/evt_0123456789abcdef/redeliver" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY"1import os2import requests34res = requests.post(5 "https://api.socialscrape.dev/v1/monitors/events/evt_0123456789abcdef/redeliver",6 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},7)8body = res.json()910if body["ok"]:11 print(body["data"])12else:13 print(body["error"]["code"], body["error"]["message"])1const res = await fetch("https://api.socialscrape.dev/v1/monitors/events/evt_0123456789abcdef/redeliver", {2 method: "POST",3 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },4});5const body = await res.json();67if (body.ok) {8 console.log(body.data);9} else {10 console.error(body.error.code, body.error.message);11}Example response#
This is a sample with illustrative values. Status 200.
200 OKSample response
1{2 "ok": true,3 "credits_charged": 0,4 "credits_remaining": 5000,5 "cached": false,6 "cached_at": null,7 "request_id": "req_28cd8fe5c398d8aea55ab9e4",8 "data": {9 "object": "webhook_redelivery",10 "event_id": "evt_0123456789abcdef",11 "queued": true,12 "previous_state": "dead"13 },14 "cursor": null,15 "has_more": null16}Response#
A WebhookRedelivery object in data.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
Every request can also fail with the account and platform errors listed on the Errors page.
Related endpoints#
- Create a monitor (
POST /v1/monitors) - List monitors (
GET /v1/monitors) - Delete a monitor (
DELETE /v1/monitors/{monitor_id}) - Send a test event (
POST /v1/monitors/{monitor_id}/test) - Webhook delivery log (
GET /v1/monitors/{monitor_id}/deliveries) - Monitor events (
GET /v1/monitors/events)