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

# Clear logs

> Permanently clear a profile’s query history.

Clearing logs removes all existing entries for the profile and the analytics derived from them. This action cannot be undone. Logging continues according to the profile’s settings. Previously generated [CSV exports](https://docs.nextdns.io/api-reference/logs/download.md) remain accessible through their download URLs for the lifetime of the export.

The account making the request must be an owner or editor of the profile. The operation always applies to the whole profile, including every device and date. Deleting a profile also clears its logs.

**profile** `string` *required*

ID of the profile whose logs you want to clear.

On success, the API returns `204 No Content` with an empty response body.

```bash cURL theme={null}
curl --request DELETE "https://api.nextdns.io/profiles/$PROFILE_ID/logs" \
  --header "X-Api-Key: $NEXTDNS_API_KEY"
```


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