> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/network-services/nat-gateway/api-howtos/delete-managed-nat-gateway.md).

# Delete a Managed NAT Gateway

IONOS CLOUD NAT Gateway: delete a managed NAT gateway using the API

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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
