> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/compute/bmc/cidr-block/releasecidrblocks.md).

# ReleaseCidrBlocks

## 1. API Description

This API (ReleaseCidrBlocks) is used to release one or more IPv4 CIDR blocks.

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

* <mark style="color:blue;">IPv4 CIDR blocks</mark> <mark style="color:blue;">in recycle bin are remained for 24 hours by default.</mark>
* <mark style="color:blue;">Only operations on</mark> <mark style="color:blue;">IPv4 CIDR blocks in recycle bin with the status of</mark> <mark style="color:blue;">`RECYCLE`</mark> <mark style="color:blue;">are supported.</mark>
* <mark style="color:blue;">This API is not applicable to IPv6 CIDR block.</mark>
* <mark style="color:blue;">Batch operations are supported. The maximum number of instances in each request is 100.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type            | Description                                                                                                                                                                                            |
| -------------- | -------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| cidrBlockIds   | Yes      | Array of String | <p>CIDR block ID(s).</p><p>To obtain the CIDR block IDs, you can call DescribeCidrBlocks and look for cidrBlockId in the response.</p><p>The maximum number of CIDR blocks in each request is 100.</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" %}
Release IPv4 CIDR blocks.

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

Request:
{
  "cidrBlockIds": [
    "cidrBlockId1",
    "cidrBlockId2"
  ]
}

Response:
{
  "requestId": "TF7DE750F-B3AA-4A65-BB46-1EE89072FC04",
  "response": {
    "requestId": "TF7DE750F-B3AA-4A65-BB46-1EE89072FC04"
  }
}
```

{% 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                                                            |
| ---------------- | ------------------------------------------- | ---------------------------------------------------------------------- |
| 403              | OPERATION\_DENIED\_CIDRBLOCK\_NOT\_RECYCLED | This operation is not supported for CIDR block not in the recycle bin. |


---

# 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 dynamically by asking a question.

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

```
GET https://docs.console.zenlayer.com/api-reference/compute/bmc/cidr-block/releasecidrblocks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
