# RenewPort

## 1. API Description

This API is used to renew a port.

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

<mark style="color:blue;">Only operations on ports in status of</mark> <mark style="color:blue;">`RECYCLED`</mark> <mark style="color:blue;">are supported.</mark>
{% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="196.87301587301587">Parameter Name</th><th width="114">Required</th><th width="103">Type</th><th>Description</th></tr></thead><tbody><tr><td>portId</td><td>Yes</td><td>String</td><td>Port ID.</td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="202.51911009697662">Parameter Name</th><th width="108">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Renew a port.**

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

Request：
{
    "portId": "your-port-id"
}

Response：
{   
  "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E",
  "response": {
     "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

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

## 6. Error Codes

No error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode).​
