Skip to main content
Send Verification Email
Sends a verification email to the authenticated user’s registered email address. The token or link expires after 5 minutes. This is for a signed-in user. When the project requires email verification before sign-in, unconfirmed users with a password can’t be signed in; they get their confirmation email from Sign Up and from a refused Sign In instead, and that link or code lasts 24 hours. Requires a valid user access token, or a service key that names the user in actingUserId. Returns 204 at once, sending nothing, if the user is already verified.

Body Parameters

All parameters are optional.
"code" | "link"
default:"\"code\""
Delivery mode.
  • "code" — The email contains a short token the user types into your app. Call the Verify Email endpoint to complete verification.
  • "link" — The email contains a button that opens a Sublay page where the user confirms; confirming verifies the email, then shows a success page that sends them on to redirectUrl (or stays there if none was given). See Verify Email Link.
"hex" | "numeric" | "alpha" | "alphanumeric"
default:"\"hex\""
Character set used to generate the token.
number
default:"6"
Length of the generated token. Must be an integer between 4 and 12. Ignored when tokenFormat is "hex".
string | null
A URL to redirect the user to after they click the verification link, or null for none. Only used when mode is "link".Must be an https address on one of your project’s Verified Domains (Dashboard → Settings → Domains). Each entry covers exactly the host it names, never its subdomains: example.com allows https://example.com/… on any port, but not www.example.com, which needs its own entry. A full address such as https://app.example.com covers only that host and port. localhost and *.localhost are always allowed, over http too. Anything else, including a custom-scheme deep link such as myapp://verified, is refused with 400 auth/redirect-url-not-allowed and no email is sent.On success verified=true is added to its query string. An invalid or expired link shows the hosted error page instead of redirecting.If omitted, the server renders a hosted success/error page.
string
Service key only, and required with one: the user this request acts as, who is sent the verification email. A user token always acts as its own user and must not send it (400 auth/acting-user-not-allowed).

Response

204 No Content with no body whenever the request is processed without a server error, including when the user is already verified.

Error Codes

Each call generates a new token. A previous unused token remains valid in Redis until it either expires or the new one is consumed first.

See Also