# Save Address to Whitelist

## Adding/Saving an Address to The Whitelist

The `CreateContactCryptoAccount` mutation allows API users to save an un-recognized address to the contact's whitelist. This action essentially means that you can name an address while labeling it to an existing contact in the organization.

The contact must exist first, in order to create a new contact, follow the steps in the [Create New Contact](/api-reference/develop-with-inabit-api/contacts/create-new-contact.md) page..

```graphql
mutation CreateContactCryptoAccount($data: ContactCryptoAccountCreateInput!) {
  createContactCryptoAccount(data: $data) {
    address
    name
    contact {
      id
      name
    }
    id
  }
}
```

### **Headers**

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

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

| Name                                          | Type   | Description             |
| --------------------------------------------- | ------ | ----------------------- |
| address<mark style="color:red;">\*</mark>     | string | Address to be saved     |
| contactName<mark style="color:red;">\*</mark> | string | Existing contact's name |
| name<mark style="color:red;">\*</mark>        | string | Address name            |
| organizationId                                | string | Organization ID         |

Example body:

```json
{
  "data": {
    "address": "0x39be337b9c1e91182d9c2c0e63233e9f2db4d9dc",
    "contactName": "Example Tests",
    "name": "Test address",
    "organizationId": "clllyfclz0007btqk0iigw1n1"
  }
}
```

### Response

Return values:

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

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

```graphql
{
  "data": {
    "createContactCryptoAccount": {
      "address": "0x39be337b9c1e91182d9c2c0e63233e9f2db4d9dd",
      "name": "Test address name",
      "contact": {
        "id": "clvmgp4h1002j88014aw1k6uf",
        "name": "Test Contact"
      },
      "id": "clvmgp4h1002h8801lx7oyycg"
    }
  }
}
```

{% 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 wallet, asset & blockchain IDs given in the body.

### Try it out!

{% embed url="<https://studio.apollographql.com/sandbox/explorer?endpoint=https://api.inabit.com/graphql&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAOIIoDyeAwnggIYoIAiCADhAM4CWKAgmDB1OnABQASAO4ALfAnREA6vQA2K8qw49+g4Z0Wy6ASSRsYKAIQBKIsAA6SIkQDm5KrQZNNXXgKEIRURk5BSlDBBt7Ryciel0AzgcnAF8HZJAAGhAAN3o8bnoAI3VODBAopzsQYLoqhQqYqslVdRQjMDqiKqgVbLgARgBmenoAdgAGScG2aQIAJiQAVgArUYQoBABOKoykxpB6EXJ2zu71ADMkUYAOaUXx-rm2FSgANjwAD0K4CEuINh2e0qIGK0AA1lBpPRuEgThguiAeghLjcepNuIMXu9uNIACy4uZwD7bEB7VJIdJZLQoc4qbjOaSUNj4RjcCBIADKUHybDQmBAySAA>" %}


---

# 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.inabit.com/api-reference/develop-with-inabit-api/wallets/save-address-to-whitelist.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.
