Create Account

POST /v1/user/accounts

Creates a new account. You become its owner, with full permissions, and are added as a member automatically. This is how you set up a separate workspace — for example, a distinct account per client or environment — alongside the default account created when you registered.

The new account starts on your current plan. It does not become active on its own; your token stays scoped to whatever account it was already on. Set switch to true to receive a token scoped to the new account in the same response (see below), or call /user/switch-account afterwards.

Request body

name string Req
Display name for the new account. Trimmed of surrounding whitespace; must be non-empty and at most 255 characters.
switch bool
Optional. When true, the response also includes a new token scoped to the newly created account, so you can start working in it immediately. Defaults to false.

Response (201 Created)

account object
The created account — same shape as /account (id, name, owner_user_id, plan_id, is_default, timestamps).
token string
Only present when switch was true. A new token scoped to the new account; use it for subsequent requests to operate inside it.
active_account_id int64
Only present when switch was true. The ID of the new account, matching the scope of the returned token.

Errors

400 Bad Request
Body could not be parsed, contained unknown fields, or name was empty or longer than 255 characters.
401 Unauthorized
Missing or invalid auth.
Request
curl -X POST "https://api.ngris.com/v1/user/accounts" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"name": "Client Project", "switch": false}'
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") result = client.users.create_account(name="Client Project") print(result["account"]["id"])
Response — 201 Created
{ "account": { "id": 87, "name": "Client Project", "owner_user_id": 1024, "plan_id": 3, "is_default": false, "is_owner": false, "created_at": "2026-05-30T12:00:00Z", "updated_at": "2026-05-30T12:00:00Z" } }
On this page
Create Account
Iris