# Recover Failed Webhooks

> Webhooks API, POST /endpoint/{endpoint_id}/recover: Resend all failed messages since a given time.

`POST /endpoint/{endpoint_id}/recover` on the Webhooks API. Base URL: `https://api.sinay.ai/webhook/api/v1`.

Resend all failed messages since a given time.

## Path parameters

::api-parameters{location="path"}
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `endpoint_id` | string | Yes | The ep's ID or UID To retrieve your endpoints ids, use GET /endpoint. Example: `unique-ep-identifier`. |
::

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `idempotency-key` | string | No | The request's idempotency key. |

## Request body

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `since` | string (date-time) | Yes | — |
| `until` | string (date-time), nullable | No | — |

::api-request-body
Example request body:

```json
{
  "since": "2024-06-12T12:00:00Z",
  "until": "2024-06-12T12:00:00Z"
}
```
::

## Responses

::api-response
---
status: "204"
description: no content
---

No body.

::

::api-response
---
status: "400"
description: Bad request
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "403"
description: Forbidden
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "404"
description: Not Found. Endpoint not found
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "422"
description: Validation Error
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | array of object | Yes | — |
| `detail[].loc` | array of string | Yes | The location as a [`Vec`] of [`String`]s -- often in the form `["body", "field_name"]`, `["query", "field_name"]`, etc. They may, however, be arbitrarily deep. |
| `detail[].msg` | string | Yes | The message accompanying the validation error item. |
| `detail[].type` | string | Yes | The type of error, often "type_error" or "value_error", but sometimes with more context like as "value_error.number.not_ge". |

::

::api-response
---
status: "429"
description: Too Many Requests
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "500"
description: Internal Error
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::
