# Resend failed messages in a time range

Source: https://checkslip.com/en/docs/recover-endpoint

POST `https://api.checkslip.com/api/webhooks/endpoints/{endpoint_id}/recover`

API key

Use it after your system was down. Resends every delivery of this endpoint that is FAILED and was created from since up to, not including, until (no until means now). Each goes out with its original webhook-id, so a system that deduplicates on webhook-id records it once. The range can be at most 14 days and reach back at most 30 days (RECOVER_WINDOW_INVALID). The work runs in the background and the response carries no count; follow it through this endpoint's deliveries that are RETRYING. A disabled endpoint must be turned on first (ENDPOINT_DISABLED). An Idempotency-Key is required. Needs an API key with webhook:manage.

## Parameters

| Field | In | Type | Required |
| --- | --- | --- | --- |
| `endpoint_id` | path | `string` | yes |
| `traceparent` | header | `string` | no |
| `Idempotency-Key` | header | `string` | yes |

## Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `since` | `string (date-time)` | yes |
| `until` | `string (date-time)` | no |

## Responses

### 202 `application/json`

| Field | Type | Required |
| --- | --- | --- |
| `endpoint_id` | `string` | yes |
| `since` | `string (date-time)` | yes |
| `until` | `string (date-time)` | yes |

### Possible errors

400 401 403 404 409 422

An error as Problem Details. All codes are listed at [Error codes](https://checkslip.com/en/docs/errors)

**cURL**

```bash
curl https://api.checkslip.com/api/webhooks/endpoints/string/recover \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY" \
  -H "Idempotency-Key: order-1042-slip-1" \
  -H "Content-Type: application/json" \
  -d '{"since":"2026-11-05T09:30:00+07:00","until":"2026-11-05T09:30:00+07:00"}'
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/webhooks/endpoints/string/recover", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
    "Idempotency-Key": "order-1042-slip-1",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    since: "2026-11-05T09:30:00+07:00",
    until: "2026-11-05T09:30:00+07:00",
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.post(
    "https://api.checkslip.com/api/webhooks/endpoints/string/recover",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
        "Idempotency-Key": "order-1042-slip-1",
    },
    json={
        "since": "2026-11-05T09:30:00+07:00",
        "until": "2026-11-05T09:30:00+07:00",
    },
)
data = res.json()
```

```json
{
  "endpoint_id": "string",
  "since": "2026-11-05T09:30:00+07:00",
  "until": "2026-11-05T09:30:00+07:00"
}
```
