curl --request DELETE "https://api.nextdns.io/profiles/$PROFILE_ID/logs" \
--header "X-Api-Key: $NEXTDNS_API_KEY"
Logs
Clear logs
Permanently clear a profile’s query history.
DELETE
/
profiles
/
{profile}
/
logs
curl --request DELETE "https://api.nextdns.io/profiles/$PROFILE_ID/logs" \
--header "X-Api-Key: $NEXTDNS_API_KEY"
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 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.
On success, the API returns
204 No Content with an empty response body.
curl --request DELETE "https://api.nextdns.io/profiles/$PROFILE_ID/logs" \
--header "X-Api-Key: $NEXTDNS_API_KEY"