1. Authentication
Litehost Connect API
  • System
    • Health check
      GET
    • API info
      GET
  • Authentication
    • Request OTP code
      POST
    • Verify OTP and get API key
      POST
    • Check the current API key
      GET
  • User
    • Get current user
      GET
  • Projects
    • List projects
      GET
    • Create project
      POST
    • Create temporary project
      POST
    • Claim anonymous project
      POST
    • Get project
      GET
    • Push new version
      PUT
    • Update project settings
      PATCH
    • Delete project
      DELETE
    • Get deployment history
      GET
    • Archive project
      POST
    • Unarchive project
      POST
    • Link opens
      GET
  • Domains
    • List domains
      GET
    • Get domain
      GET
  • Workspaces
    • List workspaces
      GET
    • Create workspace
      POST
    • Rename workspace
      PATCH
    • Delete workspace
      DELETE
  • Schemas
    • Project
    • Deployment
    • Domain
    • DomainDetail
    • WorkspaceSummary
    • ErrorResponse
    • SuccessResponse
    • FreeTierRestricted
  1. Authentication

Request OTP code

POST
/v1/auth/otp/request
Emails a 6-digit code to the address. First step of OTP sign-in — no existing account or dashboard access is required.
Safe to call more than once. While a code is open (valid for 10 minutes) no new code is created and nothing is sent: the response has data.codeAlreadySent: true. Keep waiting for the user. Only if the user says the email never arrived (after checking spam), call again with "resend": true; the same code is emailed again, at most once a minute.
Limits: 5 emails per address per hour, 10 per IP per hour.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Code sent. The response is identical whether or not the email corresponds to an existing account — this prevents account enumeration.
Bodyapplication/json

🟠400
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://connect.litehost.io/v1/auth/otp/request' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "you@example.com",
    "resend": false
}'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "Verification code sent. Check your email.",
    "nextStep": "Ask the user for the 6-digit code from the Litehost email (check spam), then call POST /v1/auth/otp/verify. Do not call this endpoint again while waiting for the user.",
    "data": {
        "sent": true,
        "resent": true,
        "codeAlreadySent": true,
        "expiresAt": "2019-08-24T14:15:22.123Z",
        "resendAvailableInSeconds": 0
    }
}
Modified at 2026-09-28 17:10:48
Previous
API info
Next
Verify OTP and get API key
Built with