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

Verify OTP and get API key

POST
/v1/auth/otp/verify
Verifies the 6-digit code sent by POST /v1/auth/otp/request.
On success:
If no Litehost account exists for the email, one is created (new accounts get a 7-day Pro trial).
An API key (lh_live_xxx) is returned once — save it where it survives the session. It renews automatically while in use and expires after 90 days without use.
Errors:
OTP_INVALID (401): wrong code. Ask the user to re-check the latest email. Do not request a new code; attemptsLeft says how many tries remain.
OTP_EXPIRED (401): no open code (expired or used). Request a new one once.
OTP_TOO_MANY_ATTEMPTS (429): after 5 wrong codes the code is cancelled. Request a new one.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
OTP verified. Account ensured. A short-lived API key is returned.
Bodyapplication/json

🟠400
🟠401
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://connect.litehost.io/v1/auth/otp/verify' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "you@example.com",
    "code": "482931"
}'
Response Response Example
200 - Success
{
    "status": "success",
    "data": {
        "email": "you@example.com",
        "apiKey": "lh_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
        "expiresAt": "2026-04-09T14:23:00.000Z",
        "message": "Signed in. This key is shown only once. It renews automatically while in use and expires after 90 days without use."
    }
}
Modified at 2026-09-28 17:10:48
Previous
Request OTP code
Next
Check the current API key
Built with