# Accept an invite

`POST /api/v1/invites/accept`

Accepts an invite. Signed in, the account joins the workspace. Without a session, a new account is made with the email, name and password given, and signed in; an email that already has an account must sign in first.

Sign-in: none needed; a dashboard session is used when there is one.

Section: Members and invites. Operation id in openapi.json: `accept_invite`.

## Request body

Required: yes.

`application/json`: AcceptInput

| Field | Type | Required | Description |
|---|---|---|---|
| `acceptTerms` | boolean | no | For a new account (since 2026-11-17): must be true, the person ticked "I accept the Terms and the Privacy policy" (422 `field.required` at `/acceptTerms` otherwise). Not read when signed in. |
| `displayName` | string \| null | no |  |
| `email` | string \| null | no | For a new account; a signed-in user joins with their own account and sends only the token. |
| `password` | string \| null | no |  |
| `token` | string | yes |  |

## Responses

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

### 200

The session.

`application/json`: SessionView

| Field | Type | Required | Description |
|---|---|---|---|
| `user` | UserView | yes |  |
| `workspaces` | array of WorkspaceSummary | yes |  |

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

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.not_allowed`: this operation needs a signed-in session; tokens cannot call it
- `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.

- `invite.not_found`: invite does not exist

### 409

Conflict.

- `invite.sign_in_required`: an account with this email exists: sign in and accept the invite
- `invite.already_member`: user is already in this workspace

### 410

Gone.

- `invite.expired`: invite is older than 72 hours
- `invite.used`: invite was already accepted

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

### 429

Too Many Requests.

- `session.rate_limited`: more than 5 changes a second from your sessions

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