API ReferenceAuthentication APIPOST /auth/otp/send

POST /auth/otp/send

Send a one-time code to the user’s email (or SMS, depending on project configuration). The user can then use POST /auth/otp/verify to authenticate without a password.

Rate limiting: OTP send is rate-limited per email and per IP to prevent abuse.

Endpoint

POST /api/v1/public/projects/:projectSlug/auth/otp/send

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
projectSlugstringYour project’s unique slug

Request Body

FieldTypeRequiredDescription
emailstringEmail address to send the OTP to

Example Request Body

{
  "email": "user@example.com"
}

Response

Success (200 OK)

{
  "status": "ok"
}

Error Responses

Status CodeError CodeDescription
400INVALID_REQUESTInvalid email or validation failed
404USER_NOT_FOUNDNo user with this email (if configured to require existing user)
429RATE_LIMIT_EXCEEDEDToo many OTP requests for this email or IP
500INTERNAL_SERVER_ERRORServer error

Available Hooks

  • Event: auth.otp.send
    • When: After OTP is sent (or queued)
    • Can do: Log OTP sends, integrate with custom messaging systems

Configure in Project → Hooks. Learn more about hooks →

Try It Now

POSThttps://api.aerocall.app/api/v1/public/projects/your-project/auth/otp/send