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

# Obriši dokument

> Obriši svoj otpremljeni dokument zajedno sa izdvojenim rezultatima

Obriši dokument otpremljen pomoću [Otpremi dokument](https://docs.anivahealth.com/sr/api/documents/upload-document.md). Koristi ovu opciju kada
otpremiš fajl na pogrešan profil. Aniva briše fajl i svaku vrednost izvučenu iz njega.
Vrednosti nestaju i iz Aniva aplikacije člana.

Zahteva opseg `documents_upload` na grupi profila u okviru koje je dokument otpremljen.

Aniva zatim šalje [webhook](https://docs.anivahealth.com/sr/concepts/webhooks.md) `document.deleted` endpointima koji su primili
poslednji događaj sa rezultatima tog dokumenta. Brisanje ne može da se opozove.

## Zahtev

### Parametri putanje

**id** `string` *required*

ID dokumenta (UUID) iz odgovora na otpremanje.

## Odgovor

U slučaju uspeha, API vraća `200 OK`.

**id** `string` *required*

Obrisani dokument.

**deleted** `boolean` *required*

Uvek `true`.

## Odgovori sa greškom

| Status | Opis |
| - | - |
| `400` | Nevažeći format ID-ja. |
| `401` | API ključ nedostaje ili nije važeći. |
| `403` | Tvoj API ključ nema opseg `documents_upload`. |
| `404` | Nijedan dokument otpremljen u nekoj od tvojih grupa profila nema ovaj ID. |
| `500` | Interna greška servera. |

```bash cURL theme={null}
curl --request DELETE \
  --url https://anivahealth.com/api/v1/documents/f8a1b2c3-d4e5-4f6a-8b8c-9d0e1f2a3b4c \
  --header 'x-api-key: YOUR_API_KEY'
```

```json 200 theme={null}
{
  "id": "f8a1b2c3-d4e5-4f6a-8b8c-9d0e1f2a3b4c",
  "deleted": true
}
```


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