> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/cookbooks/platform-admin/give-people-access/create-an-account.md).

# Create an account

Add a business unit with its own cost controls, access, and credit limits.

`POST /accounts` creates a separately billed business unit in your organization. This is the API equivalent of [Create an account](https://docs.uptiq.ai/platform-guides/admin/give-people-access/create-an-account).

## At a glance

| Item            | Value                                           |
| --------------- | ----------------------------------------------- |
| ⚙️ Microservice | `Identity Hub`                                  |
| 🌍 Environment  | `QA`                                            |
| 🔗 Base URL     | `https://api-builder-qa.uptiq.dev/identity-hub` |
| ⌘ Endpoint      | `POST /accounts`                                |

{% columns %}
{% column %}

#### What it does

Creates a separately billed business unit with its own cost controls and access.
{% endcolumn %}

{% column %}

#### Success looks like

The service returns `201` and an account ID for later account-scoped calls.
{% endcolumn %}
{% endcolumns %}

{% hint style="danger" %}
**This is a super-admin operation.** It provisions a new billing entity for the organization. An ordinary account API key cannot make this call. If your key returns `403`, see [Organisation Admin vs Account Admin](https://docs.uptiq.ai/platform-guides/admin/reference/permission-reference).
{% endhint %}

## Before you start

| You need                                                     | Why                                                                                |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| 🔑 `Organization-level API key with account-creation rights` | Authorizes the account creation. An account API key does not have this permission. |
| 🆔 `Account name`                                            | Names are unique within the organization.                                          |

## Request

`POST /accounts`

| Field      | Type   | Required | What it does                                                                                                                                       |
| ---------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`     | string | Yes      | The account's display name. Unique within the organization.                                                                                        |
| `type`     | string | No       | `Personal` or `Business`.                                                                                                                          |
| `status`   | string | No       | `Active`, `Deactivated`, or `Deleted`. Omit to create as `Active`.                                                                                 |
| `address`  | object | No       | Billing address.                                                                                                                                   |
| `llmKeys`  | object | No       | Seed provider keys at creation—see [Configure your own provider key](/cookbooks/platform-admin/models/use-your-own-provider-key.md) for the shape. |
| `metadata` | object | No       | Arbitrary key-value data for your own systems.                                                                                                     |

## Code snippets

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

```bash
curl -X POST https://api-builder-qa.uptiq.dev/identity-hub/accounts \
  -H "x-platform-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "Lending Ops",
    "type": "Business"
  }'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const res = await fetch("https://api-builder-qa.uptiq.dev/identity-hub/accounts", {
  method: "POST",
  headers: {
    "x-platform-key": process.env.UPTIQ_API_KEY,
    "content-type": "application/json",
  },
  body: JSON.stringify({ name: "Lending Ops", type: "Business" }),
});
const { data } = await res.json();
console.log(data.id);
```

{% endtab %}

{% tab title="Python" %}

```python
import os, requests

res = requests.post(
    "https://api-builder-qa.uptiq.dev/identity-hub/accounts",
    headers={"x-platform-key": os.environ["UPTIQ_API_KEY"]},
    json={"name": "Lending Ops", "type": "Business"},
)
account = res.json()["data"]
print(account["id"])
```

{% endtab %}
{% endtabs %}

## Response

| Result  | What it means                                                                                          | Next action                                                                      |
| ------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| ✅ `201` | The response contains `{ "data": { ... }, "message": "..." }`. `data` includes the new account's `id`. | Save `data.id`. Send it in the `accountid` header on later account-scoped calls. |

## Developer notes

| Situation              | What to do                                                                                                                                                                                              |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ⚠️ `status` is omitted | The account starts `Active`. There is no `Pending` state.                                                                                                                                               |
| ⚠️ The account is new  | Set a [credit limit](/cookbooks/platform-admin/cost/cap-account-spending.md), then [enable a model family](/cookbooks/platform-admin/models/enable-a-model-family.md). These steps unblock the account. |

## Related

| Related cookbook                                                                                      | When to use it                             |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| [Create an account](https://docs.uptiq.ai/platform-guides/admin/give-people-access/create-an-account) | Use the Control Center instead of the API. |
| [Invite a user](/cookbooks/platform-admin/give-people-access/invite-someone.md)                       | Add a person after creating the account.   |
| [Set a credit limit](/cookbooks/platform-admin/cost/cap-account-spending.md)                          | Stop the new account from overspending.    |


---

# 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.uptiq.ai/cookbooks/platform-admin/give-people-access/create-an-account.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.
