---
title: "Create a self-serve hosted principal and credential"
method: POST
path: "/v1/accounts"
tags: ["identity", "billing"]
---

# Create a self-serve hosted principal and credential

`POST /v1/accounts`

## Request

- Base URL: `https://api.runx.ai`
- URL: `https://api.runx.ai/v1/accounts`
- Auth: none declared

## Request body

- CreateAccountRequest
  - `display_name` string

## Response `201`

Created principal and one-time credential.

- AccountCreatedEnvelope
  - `status` 'created', required
  - `principal` object, required
  - `credential` object, required
    - `credential_id` string, required
    - `token` string, required

## Other responses

- `503`: Self-serve identity is not configured.

---

[API](https://skmtc.dev/runx/apis/runx-hosted-api.md) · [All operations](https://skmtc.dev/runx/apis/runx-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/runx/apis/runx-hosted-api/revisions/6c940d8edacc?raw)
