---
title: "create subaccount"
method: POST
path: "/api/v0/users/"
tags: ["Accounts"]
---

# create subaccount

`POST /api/v0/users/`

Creates either a standalone user account or a subaccount under a parent account. Subaccounts can be restricted to host-only functionality.

CLI Usage: `vastai create subaccount --email <email> --username <username> --password <password> [--type host]`

## Request body

- object
  - `email` string, required — User's email address
  - `username` string, required — Desired username
  - `password` string, required — Account password
  - `host_only` boolean — If true, account is restricted to host functionality only
  - `parent_id` string — Parent account ID for subaccounts. Use "me" for current user.
  - `ssh_key` string — Optional SSH public key
  - `captcha` string — Captcha token (required for non-subaccounts)

## Response `200`

Account created successfully

- object
  - `id` integer — User ID
  - `username` string
  - `email` string
  - `key_id` integer — API key for the new account

## Other responses

- `400` — Bad Request
- `403` — Forbidden - billing blacklisted
- `409` — User already exists
- `429` — Too Many Requests

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/revisions/4ed14f79f796/schema)
