tencent cloud

APIs

ReleasePublicIp

Focus Mode
Font Size
Last updated: 2026-04-27 16:54:50

1. API Description

Domain name for API request: edgezone.intl.tencentcloudapi.com.

Batch release IPv4 addresses assigned to STATIC public network instances but not bound to physical servers
This API is applicable only to STATIC mode instances. The CIDR of BGP/OSPF instances is automatically returned during deletion with no need to manually release single IP addresses.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ReleasePublicIp.
Version Yes String Common Params. The value used for this API: 2026-04-01.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
NetworkInstanceId Yes String Public network instance ID (route publishing mode is STATIC)
Type Yes String Ip type to be released, enumeration value: ipv4, ipv6
IpList.N Yes Array of String List of Ip addresses to be released

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Releasing a Public Ipv4

Input Example

POST / HTTP/1.1
Host: edgezone.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ReleasePublicIp
<Common request parameters>

{
    "NetworkInstanceId": "epn-dfghjkl",
    "Type": "ipv4",
    "IpList": [
        "226.10.12.3",
        "226.10.12.4"
    ]
}

Output Example

{
    "Response": {
        "RequestId": "test-req-026"
    }
}

Example2 Release Public Network Ipv6

Input Example

POST / HTTP/1.1
Host: edgezone.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ReleasePublicIp
<Common request parameters>

{
    "NetworkInstanceId": "epn-xxxxxxxx",
    "Type": "ipv6",
    "IpList": [
        "2001:db8::1a2b",
        "2001:db8::3c4d"
    ]
}

Output Example

{
    "Response": {
        "RequestId": "test-req-026"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.IpStillBoundToServer IP is still bound to the physical server. Terminate the physical machine before releasing the IP.
FailedOperation.NotSupportedForDynamicInstance The instance is in BGP/OSPF mode, with IPs automatically assigned or released by the system. No application is required to assign or release IPs.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameterValue.PublicIpNotAvailable The specified IPv4 is NOT_IN the instance or never applied for (Type=ipv4).
InvalidParameterValue.PublicIpv6NotAvailable The specified IPv6 is NOT_IN the instance or never applied for (Type=ipv6).
ResourceNotFound.PublicInstanceNotFound The specified public network instance does not exist
UnauthorizedOperation.PermissionDenied AppId does not match the instance ownership

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback