---
title: "Send a code to confirm it is you"
method: POST
path: "/users/@me/sudo/email-code"
tags: ["Users"]
---

# Send a code to confirm it is you

`POST /users/@me/sudo/email-code`

## Request

- Base URL: `https://web.fluxer.app/api/v1`
- URL: `https://web.fluxer.app/api/v1/users/@me/sudo/email-code`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/fluxer/apis/fluxer-api/docs/users/@me/sudo/email-code/post.ts> (a function with typed inputs; its response is checked against the schema)

Emails a 6-digit code to the confirmed address, for accounts without two-factor authentication. Accounts with two-factor authentication get 400 SUDO_SECOND_FACTOR_REQUIRED and confirm with that factor instead. Send it back with mfa_method email_code, email_code_ticket and email_code to enter sudo mode.

## Response `200`

Success

- SudoEmailCodeResponse
  - `ticket` string, required: Ticket to send back with the code in mfa_method email_code
  - `code_expires_at` string, date-time, required: When the emailed code stops working
  - `resend_available_at` string, date-time, required: When another code can be requested

## Other responses

- `400`: Bad Request - The request was malformed or contained invalid data
- `401`: Unauthorized - Authentication is required or the token is invalid
- `403`: Forbidden - You do not have permission to perform this action
- `429`: Too Many Requests - You are being rate limited
- `500`: Internal Server Error - An unexpected error occurred

## Changes

> 64 revisions in range; 2 not diffed.

- **2026-10-24** `2ecd716d4472`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fluxer/apis/fluxer-api/changes/users/@me/sudo/email-code/post.md)

---

[API](https://skmtc.dev/fluxer/apis/fluxer-api.md) - [All operations](https://skmtc.dev/fluxer/apis/fluxer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fluxer/apis/fluxer-api/revisions/2092bc8b2edf?raw)
