Create and send verification code
Create a new CodeVerification
record and sends the code to the specified identifier. The code verification can be used to verify the given identifier.
Body Required
-
The identifier (email address or phone number) to send the verification code to.
-
The interaction event for which the verification code will be used. Supported values are
SignIn
,Register
, andForgotPassword
. This determines the template for the verification code.Values are
SignIn
,Register
, orForgotPassword
.
POST /api/experience/verification/verification-code
curl \
-X POST https://[tenant_id].logto.app/api/experience/verification/verification-code \
-H "Content-Type: application/json" \
-d '{"identifier":{"type":"email","value":"string"},"interactionEvent":"SignIn"}'
Request examples
{
"identifier": {
"type": "email",
"value": "string"
},
"interactionEvent": "SignIn"
}
Response examples (200)
{
"verificationId": "string"
}