# DeleteCloudRouter

## 1. API Description

This API is used to delete a Layer 3 cloud router.

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

* <mark style="color:blue;">If you delete your cloud router, the Layer 3 network connection will be interrupted and corresponding business will stop. Please operate with caution.</mark>
* <mark style="color:blue;">Operations on cloud routers in state of CREATING or UPDATING are not supported.</mark>
* <mark style="color:blue;">Your cloud router will be stored for 2 days after deletion. See</mark> [<mark style="color:purple;">Cloud Router Deletion</mark>](https://docs.console.zenlayer.com/welcome/pricing/cloud-networking-pricing#deletion-3) <mark style="color:blue;">for more details.</mark>\ <mark style="color:blue;">During this period, the state of your cloud router will change to</mark> <mark style="color:blue;">`RECYCLED`</mark><mark style="color:blue;">. You can call</mark> [<mark style="color:purple;">`RenewCloudRouter`</mark>](https://docs.console.zenlayer.com/api-reference/networking/sdn/router/renew-cloud-router) <mark style="color:blue;">to restore it manually.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="189">Parameter Name</th><th width="111">Required</th><th width="96">Type</th><th>Description</th></tr></thead><tbody><tr><td>cloudRouterId</td><td>Yes</td><td>String</td><td>Cloud router ID.</td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="195.33333333333331">Parameter Name</th><th width="105">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" %}
**Delete a Layer 3 cloud router.**

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

Request：
{
    "cloudRouterId": "your-cloud-router-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).​
