> 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="/accounts/reading-account.md">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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.txn.io/accounts/creating-account-address.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
