# Delete a Managed NAT Gateway

Permanently remove a NAT gateway and all its associated resources from your data center using the `DELETE` request.

{% hint style="warning" %}
**Warning:**

* The operation is irreversible; you cannot undo the deletion once it begins.
* Deleting a NAT gateway terminates all active connections routed through it. It is recommended to update your routing configurations before you proceed with the deletion.
  {% endhint %}

## Endpoint

`https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}`

## Request

```bash
curl --location \
--request DELETE 'https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/d8fbc8e1-491b-4253-8c85-0cfeb3ee8728' \
--header 'Authorization: Bearer $IONOS_TOKEN'
```

{% tabs %}
{% tab title="Request Header Parameters" %}
Include the following mandatory fields in the request header to authenticate your requests:

| **Header Parameters** | **Required** | **Type** | **Description**                                                             |
| --------------------- | ------------ | -------- | --------------------------------------------------------------------------- |
| `Authorization`       | yes          | string   | Use a Bearer token to authenticate requests through a JSON Web Token (JWT). |
| {% endtab %}          |              |          |                                                                             |
| {% endtabs %}         |              |          |                                                                             |

## Response

A **202 Accepted** response indicates that the NAT Gateway deletion request is successfully initiated. The response body is empty for successful deletion requests. The resource maintains a `DESTROYING` status until the deletion is complete and the resource is removed from your data center.

{% hint style="info" %}
**Note:** NAT Gateway deletion is performed asynchronously. For core Cloud API endpoints, the response includes a `Location` header with a URL to poll the request status.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/network-services/nat-gateway/api-howtos/delete-managed-nat-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
