POST /api/verifications/verification-code/verify

Verify the provided verification code against the identifier. If successful, the verification record will be marked as verified.

application/json

Body Required

  • identifier object Required

    The identifier (email address or phone number) to verify the code against. Must match the identifier used to send the verification code.

    One of:
  • verificationId string Required

    The verification ID of the CodeVerification record.

  • code string Required

    The verification code to be verified.

Responses

  • 200 application/json

    The verification code has been successfully verified.

    Hide response attribute Show response attribute object
    • verificationRecordId string Required
  • 400

    The verification code is invalid or the maximum number of attempts has been exceeded. Check the error message for details.

  • 401

    Unauthorized

  • 403

    Forbidden

  • 501

    The connector for sending the verification code is not configured.

POST /api/verifications/verification-code/verify
curl \
 --request POST 'https://[tenant_id].logto.app/api/verifications/verification-code/verify' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"identifier":{"type":"string","value":"string"},"verificationId":"string","code":"string"}'
Request examples
{
  "identifier": {
    "type": "string",
    "value": "string"
  },
  "verificationId": "string",
  "code": "string"
}
Response examples (200)
{
  "verificationRecordId": "string"
}