# Sign up

`POST /api/v1/auth/signup`

Creates an account and emails the link that confirms its address. The answer is the same for an address that already has an account. Signs nobody in. An installation where sign-up is by invitation refuses every request the same way.

Sign-in: none.

Section: Sign-in and account. Operation id in openapi.json: `sign_up`.

## Request body

Required: yes.

`application/json`: SignupInput

| Field | Type | Required | Description |
|---|---|---|---|
| `acceptTerms` | boolean | no | Must be true: the person ticked "I accept the Terms and the Privacy policy" (since 2026-11-17; 422 `field.required` at `/acceptTerms` otherwise). |
| `displayName` | string \| null | no | 1–200 characters; the part of the email before `@` when absent. |
| `email` | string | yes |  |
| `password` | string | yes | 12–1024 characters. |
| `turnstileToken` | string \| null | no | The Turnstile widget's token, required when `GET /auth/signup/options` names a site key. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 202

Accepted: check the inbox.

`application/json`: SignupAccepted

| Field | Type | Required | Description |
|---|---|---|---|
| `checkEmail` | boolean | yes | Always true: the same answer whether or not the address already had an account. |

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `request.origin_mismatch`, `request.header_required`: a changing request with a session comes from another site or lacks `X-Monitorly-Request: 1`
- `signup.challenge_failed`: sign-up has a challenge (`GET /auth/signup/options`) and `turnstileToken` is missing or was refused
- `signup.closed`: sign-up is by invitation (`GET /auth/signup/options` answers `mode: invite`); every address gets the same answer

### 413

Payload Too Large.

- `request.too_large`: the body is larger than 256 KiB

### 422

Unprocessable Entity.

- `field.required`, `field.too_long`, `field.invalid`: a field breaks a rule; `errors` points at it
- `auth.password_too_short`: password is shorter than 12 characters
- `auth.password_too_long`: password is longer than 1024 characters

### 429

Too Many Requests.

- `signup.rate_limited`: too many sign-ups from this address or to this email domain within an hour; `Retry-After` in seconds

### 503

Service Unavailable.

- `signup.challenge_unavailable`: sign-up has a challenge and it could not be checked right now; try again

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
