# Create subAccount

<mark style="color:green;">`POST`</mark> `/`sub-account

Use this method to create a new subAccount.

#### **Headers**

| Name          | Value           |
| ------------- | --------------- |
| Authorization | `Basic <token>` |

#### **Body**

```typescript
{
  name: string,
  account: {
    id : number, // Mandatory, accountId (looks like 1234)
    name?: string,
  }
}
```

#### **Response**

{% tabs %}
{% tab title="200 : OK subAccount created" %}

```json
{
    "id": number,
    "name": "string",
    "account": {
        "id": string,
        "name": string
    }
}
```

{% endtab %}

{% tab title="400 : Bad request no account ID provided" %}

```json
{
  "missingProperty": "account_id"
}
```

{% 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://developer.nexx360.io/platform-apis/management-api/subaccounts/create-subaccount.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.
