> ## 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.

# Ponów dostarczenie

> Wyślij ponownie dostarczenie webhooka

Wyślij dostarczenie ponownie, niezależnie od jego statusu. Aniva wysyła to samo zdarzenie z tym samym `webhook-id`
i uruchamia od nowa harmonogram ponownych prób.

> [!NOTE]
>
> Wymaga zakresu `webhooks_manage`.

## Żądanie

### Parametry ścieżki

**id** `string` *required*

Identyfikator webhooka (UUID).

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

Identyfikator dostarczenia (UUID) z [Listy dostarczeń](https://docs.anivahealth.com/pl/api/webhooks/list-deliveries.md).

## Odpowiedź

W przypadku powodzenia API zwraca `202 Accepted` wraz z dostarczeniem. Jego `status` to `pending`.

**id** `string` *required*

Identyfikator dostarczenia (UUID). Jedno dostarczenie wysyła jedno zdarzenie do jednego webhooka.

**event** `object` *required*

Zdarzenie dokładnie takie, jak wysłano w treści żądania. Zobacz [Payload](https://docs.anivahealth.com/pl/concepts/webhooks.md#payload).

**status** `string` *required*

`pending`, `succeeded`, `failed` (wszystkie próby się nie powiodły lub endpoint odpowiedział `410 Gone`) lub
`cancelled` (webhook został wyłączony w trakcie oczekiwania).

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

Liczba dotychczasowych prób. Ponowne wysłanie zaczyna od nowa od `0`.

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

Czas kolejnej próby w formacie ISO 8601 UTC. `null`, gdy nie zaplanowano żadnej próby.

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

Czas ostatniej próby w formacie ISO 8601 UTC. Może mieć wartość `null`.

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

Status HTTP ostatniej próby. `null`, gdy nie nadeszła żadna odpowiedź, na przykład przy przekroczeniu limitu czasu.

**last\_error** `string`

Błąd sieci albo status i początek treści odpowiedzi. `null` po udanym dostarczeniu.

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

Ostatnie 20 prób, od najstarszej. Każda zawiera `at`, `status` (status HTTP lub `null`), `duration_ms`
i `error`.

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

Czas utworzenia dostarczenia w formacie ISO 8601 UTC.

## Odpowiedzi z błędami

| Status | Opis |
| - | - |
| `400` | Nieprawidłowe żądanie. Zobacz komunikat `error`. |
| `401` | Nieprawidłowy klucz API. |
| `403` | Brak klucza API lub klucz API bez zakresu `webhooks_manage`. |
| `404` | Nie znaleziono webhooka lub dostarczenia albo webhook należy do innego klucza API. |
| `409` | Próba tego dostarczenia właśnie trwa: spróbuj ponownie za dwie minuty. Albo webhook jest wyłączony: najpierw go włącz. |
| `500` | Wewnętrzny błąd serwera. |

```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.