# Creating account address

## Creating account address

<mark style="color:green;">`POST`</mark> `/api/public/v1/accounts/:id/addresses`

This endpoint creates a new address for a given account ID.

{% hint style="info" %}
Please note that this request is asynchronous and you will want to make a separate [Listing Account Addresses](/accounts/listing-account-addresses.md) request.
{% endhint %}

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_key>`         |

**Path Parameters**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | Account ID. |

**Body**

<table><thead><tr><th>Name</th><th width="116">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object with exchange request data.</td></tr><tr><td>data.type</td><td>string</td><td>Exchange request type. Always <code>addresses</code>.</td></tr><tr><td>data.attributes</td><td>object</td><td>A set of exchange request attributes.</td></tr><tr><td>data.attributes.network_id</td><td>string</td><td>Network ID. Refer to <a data-mention href="/pages/FavdJFtLKkNm8qh3HLsv">/pages/FavdJFtLKkNm8qh3HLsv</a></td></tr><tr><td>data.attributes.label</td><td>string</td><td>Address label. It can be anything that helps the user to recognize the address.</td></tr></tbody></table>

**Request JSON**

```json
{
  "data": {
    "type": "addresses",
    "attributes": {
      "network_id": "string",
      "label": "string"
    }
  }
}
```

**Response**

{% tabs %}
{% tab title="HTTP 200" %}

```json
{
  "data": {
    "id": "0a37e656-fdca-4afb-b78e-992a38279c9d",
    "type": "addresses",
    "attributes": {
      "label": "New Label",
      "value": null,
      "createdAt": "2025-05-29T18:15:35.492Z"
    },
    "relationships": {
      "account": {
        "meta": {
          "included": false
        }
      },
      "network": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "Invalid attribute",
      "code": "address_invalid",
      "detail": "Network does not match account currency",
      "source": {
        "pointer": "/data/attributes/networkId"
      }
    }
  ]
}
```

{% endtab %}

{% tab title="HTTP 404" %}

```json
{
  "errors": [
    {
      "status": 404,
      "title": "Record not found",
      "code": "network_not_found",
      "detail": "Network not found"
    }
  ]
}
```

{% endtab %}
{% endtabs %}


---

# 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.txn.io/accounts/creating-account-address.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.
