Create a record by verification code

POST /api/verifications/verification-code

Create a verification record and send the code to the specified identifier. The code verification can be used to verify the given identifier.

application/json

Body Required

  • identifier object Required

    The identifier (email address or phone number) to send the verification code to.

    Additional properties are allowed.

    Hide identifier attributes Show identifier attributes object
    • type string Required

      Values are email or phone.

    • value string Required

Responses

  • 201 application/json

    The verification code has been successfully sent.

    Hide response attributes Show response attributes object
  • Bad Request

  • Unauthorized

  • Forbidden

  • The connector for sending the verification code is not configured.

POST /api/verifications/verification-code
curl \
 -X POST https://[tenant_id].logto.app/api/verifications/verification-code \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"identifier":{"type":"email","value":"string"}}'
Request examples
{
  "identifier": {
    "type": "email",
    "value": "string"
  }
}
Response examples (201)
{
  "verificationRecordId": "string",
  "expiresAt": "string"
}