> For the complete documentation index, see [llms.txt](https://docs.txn.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txn.io/accounts/creating-account-address.md).

# Creating account address

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

Creates a receiving address on the given account for the specified network.

{% hint style="info" %}
This request is asynchronous. The address is registered immediately, but its `value` is generated shortly afterwards — the create response returns `value: null`. Poll [Listing account addresses](/accounts/listing-account-addresses.md) to retrieve the final address value.
{% 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>Request data object.</td></tr><tr><td>data.type</td><td>string</td><td>Resource type. Always <code>addresses</code>.</td></tr><tr><td>data.attributes</td><td>object</td><td>Address attributes.</td></tr><tr><td>data.attributes.network_id</td><td>string</td><td>ID of the network to generate the address on. Must belong to the account's currency. Read the account to list its available networks — see <a href="/pages/FavdJFtLKkNm8qh3HLsv">Reading account</a>.</td></tr><tr><td>data.attributes.label</td><td>string</td><td>Address label. Use any value that helps you recognize the address later.</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"
    }
  ]
}
```

The `network_id` does not match a known network.
{% endtab %}
{% endtabs %}

**Response Body**

| Name                         | Type   | Description                                                                                                                                                  |
| ---------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `data.id`                    | string | Address ID.                                                                                                                                                  |
| `data.type`                  | string | Entity type returned. Always `addresses`.                                                                                                                    |
| `data.attributes.label`      | string | Address label, as set in the request.                                                                                                                        |
| `data.attributes.value`      | string | The address string. `null` in this response — generated asynchronously. Retrieve it via [Listing account addresses](/accounts/listing-account-addresses.md). |
| `data.attributes.createdAt`  | string | ISO 8601 timestamp of when the address was created.                                                                                                          |
| `data.relationships.account` | object | The account the address belongs to.                                                                                                                          |
| `data.relationships.network` | object | The network the address was generated on.                                                                                                                    |


---

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