# Confirm an email address

`POST /api/v1/auth/verify-email`

Confirms the account's email with the link's token. Signs nobody in. Sessions in other browsers, tokens and linked accounts made before the confirmation end.

Sign-in: none.

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

## Request body

Required: yes.

`application/json`: VerifyInput

| Field | Type | Required | Description |
|---|---|---|---|
| `token` | string | yes |  |

## Responses

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

### 200

Confirmed.

`application/json`: Verified

| Field | Type | Required | Description |
|---|---|---|---|
| `email` | string | yes | The account's email, now confirmed; sign in with it. |

### 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`

### 404

Not Found.

- `verification.not_found`: email verification link does not exist

### 410

Gone.

- `verification.expired`: email verification link is older than 24 hours
- `verification.used`: email verification link was already used

### 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

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