> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Send 2FA Email Code ## OpenAPI ````json POST /api/v1/users.2fa.sendEmailCode { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Authentication" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Authentication" }, { "name": "Two-Factor Authentication" } ], "paths": { "/api/v1/users.2fa.sendEmailCode": { "parameters": [], "post": { "summary": "Send 2FA Email Code", "operationId": "post-api-v1-users.2fa.sendEmailCode", "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Example 1": { "value": { "success": "false", "error": "emailOrUsername is required [error-parameter-required]", "errorType": "error-parameter-required" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } }, "description": "", "parameters": [ { "$ref": "#/components/parameters/Auth-TokenNotRequired" }, { "$ref": "#/components/parameters/UserIdNotRequired" } ], "tags": [ "Two-Factor Authentication" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "emailOrUsername": { "type": "string", "description": "Enter the email or username.", "example": "test@email.com" } }, "required": [ "emailOrUsername" ] }, "examples": { "Example 1": { "value": { "emailOrUsername": "test@email.com" } } } } } } } } }, "components": { "responses": { "trueSuccess": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "x-examples": { "Success": { "success": "true" } } }, "examples": { "Success": { "value": { "success": "true" } } } } } }, "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } }, "x-examples": { "Authorization Error": { "status": "error", "message": "You must be logged in to do this." } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } }, "parameters": { "Auth-TokenNotRequired": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": "false", "schema": { "type": "string", "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" } }, "UserIdNotRequired": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": "false", "schema": { "type": "string", "example": "rbAXPnMktTFbNpwtJ" } } } } } ````