# TerminateEipAddress

## 1. API Description

This API (TerminateEipAddress) is used to return an elastic IP.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

* <mark style="color:blue;">Use this API to return an elastic IP that is no longer required. A pay-as-you-go elastic IP will stop billing after it is returns.</mark>
* <mark style="color:blue;">You cannot return a subscription elastic IP using this API, which will be returned when subscription expires.</mark>
* <mark style="color:blue;">When this API is called, the elastic IP will be moved to the recycle bin and be released in 24 hours if there are no other operations. You can also call</mark> [<mark style="color:blue;"><mark style="color:purple;">`ReleaseEipAddresses`<mark style="color:purple;"></mark>](/api-reference/compute/bmc/elastic-ip/releaseeipaddresses.md) <mark style="color:blue;">to release the elastic IP.</mark>
* <mark style="color:blue;">Only operations on an elastic IP in status of</mark> <mark style="color:blue;">`AVAILABLE`</mark><mark style="color:blue;">,</mark> <mark style="color:blue;">`ASSOCIATED`</mark><mark style="color:blue;">, or</mark> <mark style="color:blue;">`CREATE_FAILED`</mark> <mark style="color:blue;">are supported.</mark>
* <mark style="color:blue;">Operations on an elastic IP with</mark> <mark style="color:blue;">`CREATE_FAILED`</mark> <mark style="color:blue;">status will refund all payment amounts.</mark>
* <mark style="color:blue;">Operations on an elastic IP with</mark> <mark style="color:blue;">`ASSOCIATED`</mark> <mark style="color:blue;">status will unassign the elastic IP from the instance.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type   | Description                                                                                                                          |
| -------------- | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| eipId          | Yes      | String | <p>ID of an elastic IP.</p><p>To obtain the elastic IP ID, you can call DescribeEipAddresses and look for eipId in the response.</p> |

## 3. Output Parameters

| Parameter Name | Type   | Description                                                                                                           |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Return a specified elastic IP**

```json
POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: TerminateEipAddress
<Common Request Params>

Request：
{
    "eipId": "eipId"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |


---

# 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.console.zenlayer.com/api-reference/compute/bmc/elastic-ip/terminateeipaddress.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.
