# Move your account to the new email address

> Page: https://docs.plotwork.dev/api/post-user-email-verify. Index of every page: https://docs.plotwork.dev/llms.txt

Checks the code sent to the new address and moves the account to it.

`POST /user/email/verify`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Move your account to the new email address. |
| What does it take? | A JSON body of type [`EmailVerifyBody`](https://docs.plotwork.dev/api/schemas.md#emailverifybody). |
| What does it return? | Status 200 with a body of type [`AccountProfile`](https://docs.plotwork.dev/api/schemas.md#accountprofile). |
| What can go wrong? | `400` the body is not valid; `401` not signed in, or the code is wrong, expired, or used (`auth.code_invalid`); `403` an organisation manages the address (`account.email_managed`), or the origin may not make changes; `409` another account has the address (`account.email_taken`); `429` too many requests. Every failure uses the one error envelope. |

## What it does

Checks the code sent to the new address and moves the account to it. The old address gets a notice. Sessions stay open.

## Request body

The body has the type [`EmailVerifyBody`](https://docs.plotwork.dev/api/schemas.md#emailverifybody).

| Field | Type | Required | Description |
|---|---|---|---|
| `email` | `string` | yes | at least 3 characters; at most 254 characters. |
| `code` | `string` | yes | pattern `^\d{6}$`. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The account now. | [`AccountProfile`](https://docs.plotwork.dev/api/schemas.md#accountprofile) |
| 400 | The body is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in, or the code is wrong, expired, or used (`auth.code_invalid`). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | An organisation manages the address (`account.email_managed`), or the origin may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 409 | Another account has the address (`account.email_taken`). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`AccountProfile`](https://docs.plotwork.dev/api/schemas.md#accountprofile).

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | `string` | yes |  |
| `email` | `string` | yes |  |
| `name` | `string \| null` | yes | The name the account is shown by, or null for none. |
| `createdAt` | `integer` | yes | When the account was made, in milliseconds since the epoch. |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
