---
title: "Deletes a list of messages by logid and query."
method: DELETE
path: "/v3/messages/{logId}"
tags: ["Messages"]
---

# Deletes a list of messages by logid and query.

`DELETE /v3/messages/{logId}`

Required permission: `messages_delete`

## Path parameters

- `logId` string, required

## Request body

- Search
  - `query` string — Lucene query.
  - `from` string, date-time — Search from this date.
  - `to` string, date-time — Search to this date.

## Response `200`

Messages where deleted.

## Other responses

- `400` — Something wrong with the query parameters.
- `401` — API key not valid or no access to resource.
- `402` — Tried to call the logs API but the trial expired.
- `404` — Log not found.
- `429` — A maximum of 500 requests per minute and 3600 requests per hour are permitted

---

[API](https://skmtc.net/elmah/apis/elmah-io-api.md) · [All operations](https://skmtc.net/elmah/apis/elmah-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elmah/elmah-io-api/versions/8e9c6e56e4fa/schema)
