/{app_slug}/v1/auth/mfa/send-codeEmail a sign-in code for an email MFA factor
Delivers a single-use 6-digit code to the masked address of an `email` factor listed on the challenge. Submit the code via `/auth/mfa/verify`. Requires the `mfa_token` from the signin response — possession of it (i.e. a correct password) is the authority. Throttled per challenge: max 3 sends, 30s between sends; each send supersedes the prior code.
Path parameters
app_slug*stringSlug of the app.
Request body
mfa_token*stringThe `mfa_token` returned by `/auth/signin`. UUID.
Example: "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f"
factor_id*string · uuidId of the email factor (from the challenge `factors` list) to deliver the code through.
Response · 200 Code sent. Returns the masked destination and the send-attempt counters for this challenge.
email_masked*stringMasked address the code was sent to.
Example: "a***a@e***e.com"
code_expires_at*string · date-timeExpiry of the emailed code. Also bounded by the challenge expiry.
Example
Request
POST https://api.auth.productcraft.co/{app_slug}/v1/auth/mfa/send-code
Content-Type: application/json
{
"mfa_token": "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
"factor_id": "00000000-0000-0000-0000-000000000000"
}Response
{
"email_masked": "a***a@e***e.com",
"code_expires_at": "2026-01-01T00:00:00.000Z"
}