# Bridge cNGN

## Bridge cNGN

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

Initiates a cross-chain bridge of cNGN tokens. The request body must be **AES encrypted**.

#### Request Body

| Name                                                   | Type   | Description                                                                        |
| ------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------- |
| destinationNetworkId<mark style="color:red;">\*</mark> | string | The ID of the destination blockchain network.                                      |
| destinationAddress<mark style="color:red;">\*</mark>   | string | Your wallet address on the destination network.                                    |
| originNetworkId<mark style="color:red;">\*</mark>      | string | The ID of the origin blockchain network.                                           |
| senderAddress                                          | string | Your wallet address on the origin network.                                         |
| callbackUrl                                            | string | URL to receive webhook notifications about the bridge status. Must be a valid URL. |

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

```json
{
  "status": 200,
  "message": "Swap was successfully",
  "data": {
    "receivableAddress": "0xabc123def456789...",
    "transactionId": "brg-20250615-GHI789",
    "reference": "REF-20250615-JKL012"
  }
}
```

{% 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.\
> \
> Note: You can get network id by calling the [supported networks endpoint](/integrations/endpoints/get-supported-networks.md):&#x20;

#### Response Fields (Decrypted)

| Field               | Type   | Description                                        |
| ------------------- | ------ | -------------------------------------------------- |
| `receivableAddress` | string | Address to send your cNGN to on the origin network |
| `transactionId`     | string | Unique bridge transaction identifier               |
| `reference`         | string | Reference for tracking the bridge operation        |

#### Example Request

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

```json
{
  "destinationNetworkId": "clx1destnet456",
  "destinationAddress": "0x9876543210fedcba9876543210fedcba98765432",
  "originNetworkId": "clx1orignet789",
  "senderAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "callbackUrl": "https://yourapp.com/webhooks/bridge"
}
```

**Encrypted request:**

```bash
curl -X POST https://api.cngn.co/v1/api/bridge \
  -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/bridge-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.
