Request and send a verification code

POST /api/verification-codes

Request a verification code for the provided identifier (email/phone). if you're using email as the identifier, you need to setup your email connector first. if you're using phone as the identifier, you need to setup your SMS connector first.

application/json

Body object Required

One of:

Responses

  • Verification code requested and sent successfully.

  • Bad request. The payload may be invalid.

  • Unauthorized

  • Forbidden

  • Not Implemented

POST /api/verification-codes
curl \
 -X POST https://[tenant_id].logto.app/api/verification-codes \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"email":"string"}'
Request examples
{
  "email": "string"
}
{
  "phone": "string"
}