---
title: "Register"
method: POST
path: "/registrations"
---

# Register

`POST /registrations`

## Request

- Base URL: `https://api.xhostd.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xhostd.com/registrations`
- Auth: none declared

Create a ``starter`` account for the holder of an Ed25519 key.

The checks run in a fixed order: key parse, timestamp window,
signature, username, label, and then one transaction that reads the
policy row, counts the two budgets, and inserts the user, the key,
the token, and the notification. A username conflict on a random
name retries with a new name up to :data:`ALLOCATION_ATTEMPTS`
times. A budget refusal answers 429 and writes one platform event;
a closed policy answers 503 and writes none.

## Request body

- XhostdRoutesRegistrationRegisterRequest
  - `public_key` string, required
  - `timestamp` integer, required
  - `signature` string, required
  - `username` string, nullable
  - `label` string, nullable

## Response `200`

Successful Response

- RegistrationResponse
  - `user_id` string, uuid, required
  - `username` string, required
  - `plan` string, required
  - `token` string, required
  - `token_expires_at` string, date-time, required
  - `ssh_key_id` string, uuid, required
  - `fingerprint_sha256` string, required
  - `git_ssh_host` string, required
  - `limits` object, required
  - `next` object, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xhostd/apis/xhostd-public.md) · [All operations](https://skmtc.dev/xhostd/apis/xhostd-public/llms.txt) · [OpenAPI document](https://skmtc.dev/xhostd/apis/xhostd-public/revisions/bf439c4d1789?raw)
