---
title: "Create a new account"
method: POST
path: "/api/auth/register"
tags: ["Authentication"]
---

# Create a new account

`POST /api/auth/register`

## Request

- Base URL: `https://domani.run`
- URL: `https://domani.run/api/auth/register`
- Auth: none required

Starts creating a new account (or signs an existing one in) by emailing a sign-in link; no API key is returned here. A person clicking that link in a browser lands on the dashboard already signed in. A CLI or agent without a browser session should use the device-login flow instead (`POST /api/auth/cli` then poll `GET /api/auth/cli/poll`), which emails the same approval and hands back an API key once approved - the response's `next_steps` says so. Pass a `ref` code to permanently link the new user to a referrer - the referrer earns a commission on all future domain purchases by this user.

## Request body

- object
  - `email` string, email, required
  - `ref` string: Referral code - permanently links this user to the referrer. The referrer earns a commission on every domain purchase.

## Response `202`

Email verification started - no API key yet. If the account already existed, the same sign-in link is sent instead of an error.

- object
  - `ok` boolean, required
  - `verification_required` boolean, required
  - `message` string, required
  - `hint` string, required
  - `next_steps` string[], required

## Other responses

- `400`: Invalid request parameters
- `429`: Rate limit exceeded - wait and retry

---

[API](https://skmtc.dev/domani/apis/domani-run-api.md) · [All operations](https://skmtc.dev/domani/apis/domani-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/domani/apis/domani-run-api/revisions/7679f8159533?raw)
