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

# Ponovno pošlji dostavo

> Ponovno pošlji dostavo webhooka

Ponovno pošlji dostavo ne glede na njen status. Aniva pošlje isti dogodek z istim `webhook-id`
in znova zažene urnik ponovnih poskusov.

> [!NOTE]
>
> Zahteva obseg `webhooks_manage`.

## Zahteva

### Parametri poti

**id** `string` *required*

Identifikator webhooka (UUID).

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

Identifikator dostave (UUID) iz [Izpiši dostave](https://docs.anivahealth.com/sl/api/webhooks/list-deliveries.md).

## Odgovor

Ob uspehu API vrne `202 Accepted` z dostavo. Njen `status` je `pending`.

**id** `string` *required*

Identifikator dostave (UUID). Ena dostava pošlje en dogodek na en webhook.

**event** `object` *required*

Dogodek točno tako, kot je bil poslan v telesu zahtevka. Glej [Vsebina](https://docs.anivahealth.com/sl/concepts/webhooks.md#vsebina).

**status** `string` *required*

`pending`, `succeeded`, `failed` (vsi poskusi niso uspeli ali je končna točka odgovorila `410 Gone`) ali
`cancelled` (webhook je bil onemogočen, medtem ko je bila dostava v čakanju).

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

Število dosedanjih poskusov. Ponovno pošiljanje začne znova pri `0`.

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

Trenutek ISO 8601 UTC naslednjega poskusa. `null`, ko ni načrtovan noben poskus.

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

Trenutek ISO 8601 UTC zadnjega poskusa. Lahko je `null`.

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

Status HTTP zadnjega poskusa. `null`, ko odgovor ni prispel, na primer ob izteku časa.

**last\_error** `string`

Omrežna napaka ali status in začetek telesa odgovora. `null` po uspehu.

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

Zadnjih 20 poskusov, najprej najstarejši. Vsak vsebuje `at`, `status` (status HTTP ali `null`),
`duration_ms` in `error`.

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

Trenutek ISO 8601 UTC, ko je bila dostava ustvarjena.

## Odgovori z napako

| Status | Opis |
| - | - |
| `400` | Neveljavna zahteva. Glej sporočilo `error`. |
| `401` | Brez ključa API ali neveljaven ključ API. |
| `403` | Tvoj ključ API nima obsega `webhooks_manage`. |
| `404` | Webhook ali dostava ni najdena ali pa webhook pripada drugemu ključu API. |
| `409` | Poskus te dostave že teče: poskusi znova čez dve minuti. Ali pa je webhook onemogočen: najprej ga omogoči. |
| `500` | Notranja napaka strežnika. |

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