Skip to content

Start enabling email codes

POST
/v1/auth/2fa/email/enable
curl --request POST \
--url https://api.emite.cr/v1/auth/2fa/email/enable \
--header 'Content-Type: application/json' \
--data '{ "password": "example" }'

Sends a 6-digit code, valid for 15 minutes, to the account email: the mailbox confirmation needed to enable the email-code method, completed at POST /v1/auth/2fa/email/confirm. Requires the current password. 409 TWO_FACTOR_ALREADY_ENABLED when the method is already active. At most one code every 60 seconds (429 EMAIL_VERIFICATION_COOLDOWN); 503 EMAIL_DELIVERY_FAILED when the email could not be sent.

Media typeapplication/json
object
password
required

The current password of the account. A wrong one answers 400 INVALID_CURRENT_PASSWORD.

string
Examplegenerated
{
"password": "example"
}

The code was sent. The response has no body.