# API Reference

All services for Travel Rule are listed here. You can search for services from the indicator on the right.

### Create Transaction

<mark style="color:green;">`POST`</mark> `https://api.getdefy.co/v2/travelrule/create_tx`

This service is there to allow you to create a transaction when sending money of the endpoint. The originator data must definitely include the name and wallet address. In the originator data, you must send one of the following data: date of birth, identity information, address or customer number. On the beneficiary side, it is sufficient to send only the name and wallet address data.

**Body**

<table><thead><tr><th width="308">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>transaction_ref</code></td><td>string</td><td>Transaction reference number from your system. (Required)</td></tr><tr><td><code>transaction_asset</code></td><td>string</td><td>Asset Symbol (Required)</td></tr><tr><td><code>transaction_network</code></td><td>string</td><td>Asset Network</td></tr><tr><td><code>transaction_amount</code></td><td>string</td><td>Asset Amount (Required)</td></tr><tr><td><code>transaction_asset_decimals</code></td><td>string</td><td>Asset Decimals (Required)</td></tr><tr><td><code>originator</code></td><td>object</td><td>Originator Data (Required)</td></tr><tr><td><code>persons</code></td><td>array</td><td>Originator Person Data (Required)</td></tr><tr><td><code>name</code></td><td>object</td><td>Originator Person Name (Required)</td></tr><tr><td><code>dateAndPlaceOfBirth</code></td><td>object</td><td>Originator Person birthplace or birthday</td></tr><tr><td><code>nationalIdentifier</code></td><td>object</td><td>Originator Person national identifier</td></tr><tr><td><code>customerIdenficiation</code></td><td>object</td><td>Originator Person customer ID</td></tr><tr><td><code>geographicAddress</code></td><td>object</td><td>Originator Person's Address</td></tr><tr><td><code>accountNumber</code></td><td>array</td><td>Originator Wallet Address (Required)</td></tr><tr><td><code>beneficiary</code></td><td>object</td><td>Beneficiary Data (Required)</td></tr><tr><td><code>persons</code></td><td>array</td><td>Beneficiary Person Data (Required)</td></tr><tr><td><code>name</code></td><td>object</td><td>Beneficiary Person Name (Required)</td></tr><tr><td><code>dateAndPlaceOfBirth</code></td><td>object</td><td>Beneficiary Person birthplace or birthday</td></tr><tr><td><code>nationalIdenficiation</code></td><td>object</td><td>Beneficiary Person national identifier</td></tr><tr><td><code>customerIdenficiation</code></td><td>object</td><td>Beneficiary Person customer ID</td></tr><tr><td><code>geographicAddress</code></td><td>object</td><td>Beneficiary Person's Address</td></tr><tr><td><code>accountNumber</code></td><td>array</td><td>Beneficiary Wallet Address (Required)</td></tr></tbody></table>

{% tabs %}
{% tab title="Request" %}

```javascript
const axios = require('axios');

const data = JSON.stringify({
    "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a52f",
    "transaction_asset": "ETH",
    "transaction_amount": "20000000000000000000", 
    "transaction_asset_decimals": "18",
    "beneficiary_vasp_id": "3651dcbf-b41f-4f68-b79b-7ce794caf233",
    "originator": {
        "persons": [
            {
                "naturalPerson": {
                    "name": {
                        "nameIdentifier": [
                            {
                                "primaryIdentifier": "Merve",
                                "secondaryIdentifier": "Güler",
                                "nameIdentifierType": "LEGL"
                            }
                        ]
                    },
                    "dateAndPlaceOfBirth": {
                        "dateOfBirth": "1990-02-24",
                        "placeOfBirth": "Singapore"
                    },
                    "nationalIdentification": {
                        "nationalIdentifier": "12345678910",
                        "nationalIdentifierType": "CCPT",
                        "countryOfIssue": "TR"
                    },
                    "geographicAddress": [
                        {
                            "addressType": "GEOG",
                            "streetName": "Potential Street",
                            "buildingNumber": "123",
                            "buildingName": "Cheese Hut",
                            "postCode": "91361",
                            "townName": "Thousand Oaks",
                            "countrySubDivision": "California",
                            "country": "US"
                        }
                    ],
                    "customerIdentification": "01010101"
                }
            }
        ],
        "accountNumber": [
            "0x1d0d2d8c85441050abc9eb654399fa198fbd5720"
        ]
    },
    "beneficiary": {
        "persons": [
            {
                "naturalPerson": {
                    "name": {
                        "nameIdentifier": [
                            {
                                "primaryIdentifier": "Merve",
                                "secondaryIdentifier": "Güler",
                                "nameIdentifierType": "LEGL"
                            }
                        ]
                    }
                }
            }
        ],
        "accountNumber": [
            "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
        ]
    }
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/create_tx',
  headers: { 
    'Content-Type': 'application/json', 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "code": 0,
    "message": "OK",
    "data": "PENDING"
}
```

{% endtab %}
{% endtabs %}

### Send Transaction Hash

<mark style="color:green;">`POST`</mark> `https://api.getdefy.co/v2/travelrule/send_tx_hash`

This service is sending transaction hash to us for travel rule protocol.

**Body**

| Name               | Type   | Description                                   |
| ------------------ | ------ | --------------------------------------------- |
| `transaction_ref`  | string | Your transaction reference number. (Required) |
| `transaction_hash` | string | On-Chain Transaction Hash  (Required)         |

{% tabs %}
{% tab title="Request" %}

```javascript
const axios = require('axios');

const data = JSON.stringify({
  "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a54d",
  "transaction_hash": "0xETH"
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/send_tx_hash',
  headers: { 
    'Content-Type': 'application/json', 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "code": 0,
    "message": "OK",
    "data": null
}
```

{% endtab %}
{% endtabs %}

### List Available VASPs

<mark style="color:green;">`GET`</mark> `https://api.getdefy.co/v2/travelrule/list_vasps`

This service is listing available vasps for travel rule withdrawal.

{% tabs %}
{% tab title="Request" %}

```javascript
const axios = require('axios');

const config = {
  method: 'get',
  url: 'https://api.getdefy.co/v2/travelrule/list_vasps?page=1&limit=10',
  headers: { 
    'apikey': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Response" %}

```json
{
    "code": 0,
    "message": "OK",
    "data": [
        {
            "uid": "acb4b639-3709-4571-a3cf-e3f2d3991421",
            "name": "BitPreco",
            "legal_name": "Cbtc Servicos Digitais LTDA",
            "country": "BR",
            "website": "https://bitpreco.com"
        },
        {
            "uid": "15291543-677a-4d1e-a147-e184a922be74",
            "name": "Buda",
            "legal_name": "SURBTC SpA",
            "country": "CL",
            "website": "https://www.buda.com/"
        },
        {
            "uid": "bfd1a0d0-4229-48dc-a671-befaed4efaaf",
            "name": "BTCC US",
            "legal_name": "BTCC USA Limited",
            "country": "US",
            "website": "https://www.btcc.com/en-US"
        },
        {
            "uid": "a9c9bed7-615a-4322-9ac6-fd57b7ac6b98",
            "name": "BTC Markets",
            "legal_name": "BTC Markets Pty Ltd",
            "country": "AU",
            "website": "https://www.btcmarkets.net"
        },
        {
            "uid": "1fa438e0-04ca-4f9d-92fb-463f2d8248e9",
            "name": "TOPBTC",
            "legal_name": null,
            "country": null,
            "website": "https://www.topbtc.com"
        },
        {
            "uid": "77a3a254-4a9f-45b5-a50a-e2621f8c56f1",
            "name": "BITPESA",
            "legal_name": "BTC AFRICA SA",
            "country": "KE",
            "website": "https://bitpesa.co"
        },
        {
            "uid": "9a515f3c-e6f9-4e58-ab17-f0de6a0ffff9",
            "name": "BTC-Alpha",
            "legal_name": "BTC-Alpha",
            "country": "GB",
            "website": "https://btc-alpha.com"
        },
        {
            "uid": "8588c632-8038-4f9e-a681-9036d7a055c1",
            "name": "BTCC.com",
            "legal_name": "BTCC Lithuania Limited UAB",
            "country": "LT",
            "website": "https://btcc.com"
        },
        {
            "uid": "57a9095a-ee48-46e5-b72c-2f4688f2dbb8",
            "name": "BtcTurk | Pro",
            "legal_name": "Eliptik Yazilim ve Ticaret",
            "country": "TR",
            "website": "https://pro.btcturk.com"
        },
        {
            "uid": "a86e5408-fb3b-42a6-9761-5dc8996b285e",
            "name": "BTCTurk",
            "legal_name": null,
            "country": "tr",
            "website": "https://webhook.site/ca1e089b-326a-4c7a-8511-6ca5e2756125"
        }
    ],
    "page_count": 3
}
```

{% endtab %}
{% endtabs %}

### Send Wallet Address

<mark style="color:green;">`POST`</mark> `https://api.getdefy.co/v2/travelrule/send_address`

This service is sending wallet address to us for travel rule protocol.

**Body**

| Name              | Type   | Description                                   |
| ----------------- | ------ | --------------------------------------------- |
| `transaction_ref` | string | Your transaction reference number. (Required) |
| `address`         | string | Wallet Address (Required)                     |

{% tabs %}
{% tab title="Request" %}

```javascript
const axios = require('axios');

const data = JSON.stringify({
  "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a54d",
  "address": "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/send_address',
  headers: { 
    'Content-Type': 'application/json', 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "code": 0,
    "message": "OK",
    "data": null
}
```

{% endtab %}
{% endtabs %}

### Receive Transaction Without Protocol

<mark style="color:green;">`POST`</mark> `https://api.getdefy.co/v2/travelrule/receive_tx_without_protocol`

This service is there to allow you to receive a transaction when without protocol.

{% tabs %}
{% tab title="Request" %}

```javascript
const axios = require('axios');

const data = JSON.stringify({
  "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a51f",
  "transaction_asset": "ETH",
  "transaction_hash": "0xTest",
  "transaction_amount": "20000000000000000000",
  "transaction_asset_decimals": "18",
  "originator": {
    "persons": [
      {
        "naturalPerson": {
          "name": {
            "nameIdentifier": [
              {
                "primaryIdentifier": "Merve",
                "secondaryIdentifier": "Güler",
                "nameIdentifierType": "LEGL"
              }
            ]
          },
          "dateAndPlaceOfBirth": {
            "dateOfBirth": "1990-02-24",
            "placeOfBirth": "Singapore"
          },
          "nationalIdentification": {
            "nationalIdentifier": "12345678910",
            "nationalIdentifierType": "CCPT",
            "countryOfIssue": "TR"
          },
          "geographicAddress": [
            {
              "addressType": "GEOG",
              "streetName": "Potential Street",
              "buildingNumber": "123",
              "buildingName": "Cheese Hut",
              "postCode": "91361",
              "townName": "Thousand Oaks",
              "countrySubDivision": "California",
              "country": "US"
            }
          ],
          "customerIdentification": "01010101"
        }
      }
    ],
    "accountNumber": [
      "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
    ]
  },
  "beneficiary": {
    "persons": [
      {
        "naturalPerson": {
          "name": {
            "nameIdentifier": [
              {
                "primaryIdentifier": "Merve",
                "secondaryIdentifier": "Güler",
                "nameIdentifierType": "LEGL"
              }
            ]
          }
        }
      }
    ],
    "accountNumber": [
      "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
    ]
  },
  "created_at": "2025-02-10T14:16:03.544Z"
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/receive_tx_without_protocol',
  headers: { 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Response" %}

```json
{
    "code": 0,
    "message": "OK",
    "data": "APPROVED"
}
```

{% endtab %}
{% endtabs %}

### Notes

* You need to enter the network parameter to get clearer data. If you do not enter the network parameter, we add the default network according to the wallet address.


---

# 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.getdefy.co/travel-rule/api-reference.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.
