# Create Transfer Request

## Create a Withdrawal

Initiate a mutation to create an assets transfer request to send for approval from one of your organization's wallets.

{% hint style="success" %}
Important Note - Naming convention for this process is slightly different than what's presented in our interface.\
In our platform "withdrawals" are described as "Money Transfers" while in our API, the mutation is called `createWithdrawal.`
{% endhint %}

```graphql
mutation CreateWithdrawal($data: WithdrawalCreateInput!) {
  createWithdrawal(data: $data) {
    id
  }
}
```

### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

### Body (<mark style="color:orange;">WithdrawalCreateInput</mark>) object

| Name                                                  | Type    | Description                                                  |
| ----------------------------------------------------- | ------- | ------------------------------------------------------------ |
| id<mark style="color:red;">\*</mark>                  | String  | Wallet ID                                                    |
| id<mark style="color:red;">\*</mark> (financialAsset) | String  | Asset ID                                                     |
| address<mark style="color:red;">\*</mark>             | String  | Destination Address (To)                                     |
| amount<mark style="color:red;">\*</mark>              | Integer | Transfer amount                                              |
| id<mark style="color:red;">\*</mark> (blockchain)     | String  | Blockchain ID                                                |
| note                                                  | String  | Transaction Note                                             |
| priority                                              | String  | <p>Transaction Priority</p><p>(Slow, medium, fast, etc.)</p> |

Example body:

```graphql
{
	"data": {
		"wallet": {
			"id": "clol7o576002oaz011mmtnvru"
		},
		"financialAsset": {
			"id": "clefn78gv011olc6rcwtt0wel"
		},
		"address": "0x7582f3483116105e0b7845ac1a0df5eb0c8cd062",
		"amount": 5,
		"blockchain": {
			"id": "clefn78em00mslc6r3lzf3h5a"
		},
		"note": "",
		"priority": "Medium"
	}
}
```

### Response

Return values:

| Name | Type   | Description   |
| ---- | ------ | ------------- |
| id   | String | Withdrawal ID |

{% tabs %}
{% tab title="🟢 Success" %}

```javascript
{
	"data": {
		"createWithdrawal": {
			"id": "clpgvrjb700136g01lr3o0tgu",
		}
	}
}
```

{% endtab %}

{% tab title="🔴 Failure" %}

```javascript
{
}
```

{% endtab %}
{% endtabs %}

### Try it out!

{% embed url="<https://studio.apollographql.com/sandbox/explorer?endpoint=https://api.inabit.dev/graphql&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABACp4CGSAzuVCgJYRIAUAJAO4AW+C6pF1WgyYB1bngQBVJPRwIAkkgAOMFAEIAlEWAAdJESIoBNOoxZcefDuIRbd+g0Xpg9jouTgQYqV44BGADbQANZQnOT0+vZuBkgeCL5uUBBgCQ4GAL6JRFAS5CgIYACCKNm5CPmFAELE0TEAZjABAQBy8dlZ6UT1CGluSBAF2VQo+TBU2tkGI2NUHdns5M0IKJNdse3rTi5dnW71kZRQ9EtFVFQrazE5KX2Oe470VEVQUAgB+JU7bkp4jH8oAjZCgFSQAZQAIsDKgBRSQAJWywQIpQcnQyIAANCAAG7kP7kQIIKgYEB1HQgCwSCl8OoGCnOGlEClQZoBAj1ThgABWAAZeewAJx+FBYYIIAAsAHZ2BcqAAPCm+dFYkBKCAjeoBegAc04KAA8kpPsIkGDcvQlGhMCAMkA>" %}
