---
title: "POST /#X-Amz-Target=AmazonAthena.DeleteNamedQuery"
method: POST
path: "/#X-Amz-Target=AmazonAthena.DeleteNamedQuery"
---

# POST /#X-Amz-Target=AmazonAthena.DeleteNamedQuery

`POST /#X-Amz-Target=AmazonAthena.DeleteNamedQuery`

Deletes the named query if you have access to the workgroup in which the query was saved.

For code samples using the Amazon Web Services SDK for Java, see [Examples and Code Samples](http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the _Amazon Athena User Guide_.

## Headers

- `X-Amz-Target` 'AmazonAthena.DeleteNamedQuery', required

## Request body

- DeleteNamedQueryInput
  - `NamedQueryId` string, required — The unique ID of the query to delete.

## Response `200`

Success

- DeleteNamedQueryOutput

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
