> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anivahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Znovu odeslat doručení

> Odeslat doručení webhooku znovu

Pošli doručení znovu bez ohledu na jeho stav. Aniva odešle stejnou událost se stejným `webhook-id`
a spustí plán opakování od začátku.

> [!NOTE]
>
> Vyžaduje scope `webhooks_manage`.

## Požadavek

### Parametry cesty

**id** `string` *required*

Identifikátor webhooku (UUID).

**delivery\_id** `string` *required*

Identifikátor doručení (UUID) z [Výpisu doručení](https://docs.anivahealth.com/cs/api/webhooks/list-deliveries.md).

## Odpověď

Při úspěchu vrátí API `202 Accepted` s doručením. Jeho `status` je `pending`.

**id** `string` *required*

Identifikátor doručení (UUID). Jedno doručení odešle jednu událost na jeden webhook.

**event** `object` *required*

Událost přesně tak, jak byla odeslána v těle požadavku. Viz [Payload](https://docs.anivahealth.com/cs/concepts/webhooks.md#payload).

**status** `string` *required*

`pending`, `succeeded`, `failed` (všechny pokusy selhaly nebo endpoint odpověděl `410 Gone`) nebo
`cancelled` (webhook byl během čekání vypnut).

**attempt\_count** `integer` *required*

Dosud provedené pokusy. Opětovné odeslání začíná znovu na `0`.

**next\_attempt\_at** `string`

Čas dalšího pokusu ve formátu ISO 8601 UTC. `null`, pokud není naplánovaný žádný pokus.

**last\_attempt\_at** `string`

Čas posledního pokusu ve formátu ISO 8601 UTC. Může být `null`.

**last\_response\_status** `integer`

HTTP status posledního pokusu. `null`, pokud nepřišla žádná odpověď, například při vypršení časového limitu.

**last\_error** `string`

Chyba sítě, nebo status a začátek těla odpovědi. `null` po úspěchu.

**attempts** `object[]` *required*

Posledních 20 pokusů, od nejstaršího. Každý obsahuje `at`, `status` (HTTP status nebo `null`), `duration_ms`
a `error`.

**created\_at** `string` *required*

Čas vytvoření doručení ve formátu ISO 8601 UTC.

## Chybové odpovědi

| Status | Popis |
| - | - |
| `400` | Neplatný požadavek. Viz zpráva `error`. |
| `401` | Neplatný API klíč. |
| `403` | Chybějící API klíč, nebo API klíč bez oprávnění `webhooks_manage`. |
| `404` | Webhook nebo doručení nebylo nalezeno, nebo webhook patří jinému API klíči. |
| `409` | Pokus o toto doručení právě běží: zkus to znovu za dvě minuty. Nebo je webhook vypnutý: nejdřív ho zapni. |
| `500` | Interní chyba serveru. |

```bash cURL theme={null}
curl --request POST \
  --url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/deliveries/7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f/resend \
  --header 'x-api-key: YOUR_API_KEY'
```

```json 202 theme={null}
{
  "id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f",
  "event": {
    "id": "0b8e6f3a-2c4d-4e7f-9a1b-3c5d7e9f1a2b",
    "type": "appointment.confirmed",
    "timestamp": "2026-10-15T09:12:44.512Z",
    "data": {
      "object": "appointment",
      "id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
      "url": "https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
      "status": "confirmed",
      "previous_status": "pending",
      "status_revision": 2
    }
  },
  "status": "pending",
  "attempt_count": 0,
  "next_attempt_at": "2026-10-16T10:00:00.000Z",
  "last_attempt_at": "2026-10-15T09:13:06.000Z",
  "last_response_status": 204,
  "last_error": null,
  "attempts": [
    {
      "at": "2026-10-15T09:13:01.000Z",
      "status": 503,
      "duration_ms": 412,
      "error": "HTTP 503: Service Unavailable"
    },
    {
      "at": "2026-10-15T09:13:06.000Z",
      "status": 204,
      "duration_ms": 88,
      "error": null
    }
  ],
  "created_at": "2026-10-15T09:13:00.000Z"
}
```

```json 404 theme={null}
{
  "error": "Delivery not found"
}
```

```json 409 theme={null}
{
  "error": "An attempt is running. Try again in two minutes."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.