> For the complete documentation index, see [llms.txt](https://docs.orangepill.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orangepill.cloud/orangepill-api/aliases.md).

# Aliases

Use Aliases to assign unique codes to Accounts, i.e iBAN number, or to Identities, i.e phone number.  You can assign multiple Aliases to a single Account or identity. Each Alias can be assigned only once. Both Account and Identity cannot share the same Alias. &#x20;

{% hint style="info" %}
IMPORTANT: Both Accounts and Identities share the same realm-wide alias directory.
{% endhint %}

## Account Aliases

To create Alias for account you must add `type: "account"` in your Request.

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

```shell
echo 'create account alias'

curl --location --request POST 'https://api.orangepill.cloud/v1/aliases' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'
--data-raw '{
    "alias": "IBAN1234567890",
    "type": "account",
    "account": "daeb815cb436563ab92d694b",
    "data": {
        "field1": "value1"
    },
}'
```

{% endtab %}
{% endtabs %}

In response you will get new Alias.

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "id": "63ab92d694bdaeb815cb4365",
    "alias": "IBAN1234567890",
    "type": "account",
    "account": "daeb815cb436563ab92d694b",
    "data": {
        "field1": "value1"
    },
    "owner": "639675ab191e9023f356dfa6",
    "created_at": 1672188630240,
    "error": null,
    "deleted": false

}
</code></pre>

## Identity Aliases

To create Alias for account you must add `type: "identity"` in your Request.

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

```shell
echo 'create identity alias'

curl --location --request GET 'https://api.orangepill.cloud/v1/aliases' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'
--data-raw '{
    "alias": "+11234567890",
    "type": "identity",
    "identity": "daeb815cb436563ab92d694b",
    "data": {
        "field1": "value1"
    },
}'
```

{% endtab %}
{% endtabs %}

In response you will get new alias.

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "id": "63ab92d694bdaeb815cb4365",
    "alias": "+11234567890",
    "type": "identity",
    "identity": "daeb815cb436563ab92d694b",
    "data": {
        "field1": "value1"
    },
    "owner": "639675ab191e9023f356dfa6",
    "created_at": 1672188630240,
    "error": null,
    "deleted": false

}
</code></pre>
