> For the complete documentation index, see [llms.txt](https://docs.inabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inabit.com/api-reference/develop-with-inabit-api/wallets/generate-deposit-address.md).

# Generate Deposit Address

## Adding a New Coin to a Wallet

The `AddCoinAddress` query allows API users to add a new coin into their API wallet/s. This action will generate a new blockchain address in the wallet.

> Remember to authenticate to call our GraphQL API using an access token (bearer) with your **API** **Admin** credentials. (If you're not sure how, refer to [Authentication](/api-reference/develop-with-inabit-api/getting-started/authentication.md))
>
> Don't have an API Admin user yet? contact us at <mark style="color:blue;"><support@inabit.com></mark> to create one!

```graphql
query AddCoinAddress($where: WalletDepositAddressWhereInput!) {
  addCoinAddress(where: $where) {
    address
  }
}
```

### **Headers**

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

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

| Name                                               | Type   | Description                                               |
| -------------------------------------------------- | ------ | --------------------------------------------------------- |
| walletId<mark style="color:red;">\*</mark>         | string | ID of the wallet                                          |
| financialAssetId<mark style="color:red;">\*</mark> | string | ID of the financial asset in inabit (can be token/native) |
| blockchainId<mark style="color:red;">\*</mark>     | string | ID of the blockchain in inabit                            |

Example body:

```graphql
{
  "where": {
    "walletId": "clvm13aa70003phy2n5j7ece9",
    "assetId": "clefn78h5012plc6rxbmofnop",
    "blockchainId": "clefn78cl00i3lc6rih442mx9"
  }
}
```

### Response

Return values:

| Name    | Type   | Description        |
| ------- | ------ | ------------------ |
| address | String | API Wallet Address |

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

```graphql
{
  "data": {
    "addCoinAddress": {
      "address": "0xca832a87caf09dcecdbe4d3bda46d67da53b69f5",
    }
  }
}
```

{% endtab %}

{% tab title="🔴 Failure" %}

```graphql
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

In the query's response, you will receive the created API wallet address for the asset & blockchain given in the body.

{% hint style="info" %}
**Reminder** - You can't add multiple blockchains under the same API wallet.\
**One** inabit API wallet = **one** address
{% endhint %}

### Try it out!

{% embed url="<https://studio.apollographql.com/sandbox/explorer?endpoint=https://api.inabit.com/graphql&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAIJhgDCEAlkmWHggM5MAUAJAO4AW+C6RAOoBDADaiEKACIIADhCbUU9Ri0G9GASSSyYKAIQBKIsAA6SIkWHkqtFczY8+ArhoTGzFy1fKqm5ywBfc0CQABoQADdhPGphACMJJgwQT0tTECdGDIE07wzOMQkUTTAcogyoUUi4AEYAZmFhAHYABnb62W4CACYkAFYAK2aEKAQATgywgPyQYRZJUvLKiQAzJGaADm5+1tqe2VEoADY8AA94uAh1iFkpmfSQROgAayhuYVoljAqQKoR1lsqu1qPUjqdqNwACxQnpwM6TEAzYJIUIReRMFCrUTUADm3BQAHlZPhhChqBAkABlKCxWRoTAgQJAA>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.inabit.com/api-reference/develop-with-inabit-api/wallets/generate-deposit-address.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
