# Withdraw cNGN

## Withdraw cNGN

<mark style="color:green;">`POST`</mark> `https://api.cngn.co/v1/api/withdraw`

Initiates a withdrawal of cNGN to an external wallet. **Requires `Send Crypto` permission.** Subject to service availability. The request body must be **AES encrypted**.

#### Request Body

| Name                                        | Type    | Description                                                                                              |
| ------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
| amount<mark style="color:red;">\*</mark>    | number  | Amount of cNGN to withdraw.                                                                              |
| address<mark style="color:red;">\*</mark>   | string  | Destination blockchain wallet address.                                                                   |
| networkId<mark style="color:red;">\*</mark> | string  | Target blockchain network ID. Use the **Get Supported Networks** endpoint to retrieve valid network IDs. |
| shouldSaveAddress                           | boolean | Whether to save the address as a whitelisted beneficiary. Default: `false`                               |

{% tabs %}
{% tab title="200 Withdrawal was successfully" %}

```json
{
  "status": 200,
  "message": "Withdrawal was successfully",
  "data": {
    "trxRef": "WTH-20250615-DEF456",
    "address": "0x5678901234abcdef5678901234abcdef56789012"
  }
}
```

{% endtab %}

{% tab title="400 Invalid request" %}

```json
{
  "status": 400,
  "message": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

> **Encryption Required:** The request body must be encrypted using AES-256-CBC before sending. See the Encrypting / Decrypting Request section.

#### Response Fields (Decrypted)

| Field     | Type   | Description                                 |
| --------- | ------ | ------------------------------------------- |
| `trxRef`  | string | Transaction reference for tracking          |
| `address` | string | The destination wallet address confirmation |

#### Example Request

The request body should be encrypted. Below shows the **plaintext payload** before encryption:

```json
{
  "amount": 25000,
  "address": "0x5678901234abcdef5678901234abcdef56789012",
  "networkId": "clx1network123",
  "shouldSaveAddress": true
}
```

**Encrypted request:**

```bash
curl -X POST https://api.cngn.co/v1/api/withdraw \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "content": "BASE64_ENCRYPTED_CONTENT",
    "iv": "BASE64_IV"
  }'
```


---

# 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.cngn.co/integrations/endpoints/withdraw-cngn.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.
