Send an event again
Beta 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
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- 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).
curl
curl -X POST "https://api.socialscrape.io/v1/monitors/events/evt_0123456789abcdef/redeliver" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY"Python
import os
import requests
res = requests.post(
"https://api.socialscrape.io/v1/monitors/events/evt_0123456789abcdef/redeliver",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])TypeScript
const res = await fetch("https://api.socialscrape.io/v1/monitors/events/evt_0123456789abcdef/redeliver", {
method: "POST",
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}Example response#
This is a sample with illustrative values. Status 200.
{
"ok": true,
"credits_charged": 0,
"credits_remaining": 5000,
"cached": false,
"cached_at": null,
"request_id": "req_28cd8fe5c398d8aea55ab9e4",
"data": {
"object": "webhook_redelivery",
"event_id": "evt_0123456789abcdef",
"queued": true,
"previous_state": "dead"
},
"cursor": null,
"has_more": null
}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)