1. Authentication
Litehost Connect API
  • System
    • Health check
      GET
    • API info
      GET
  • User
    • Get current user
      GET
  • Projects
    • List projects
      GET
    • Create 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
  • Domains
    • List domains
      GET
    • Get domain
      GET
  • Workspaces
    • List workspaces
      GET
    • Create workspace
      POST
    • Rename workspace
      PATCH
    • Delete workspace
      DELETE
  • Authentication
    • Request OTP code
      POST
    • Verify OTP and get API key
      POST
  • Schemas
    • Project
    • Deployment
    • Domain
    • DomainDetail
    • WorkspaceSummary
    • ErrorResponse
    • SuccessResponse
  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 automatically on the free plan.
A short-lived API key (lh_live_xxx) valid for 7 days is generated and returned. This key is shown only once — store it securely.
The key is not shown in the Litehost dashboard and does not count against the dashboard key limit.
When the key expires, run the OTP flow again to obtain a fresh one. The account is not re-created — only a new key is issued.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

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

🟠400
🟠401
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://connect.litehost.io/v1/auth/otp/verify' \
--header 'Authorization: Bearer <token>' \
--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": "Account ready. This API key expires in 7 days. Use it as your Bearer token — it is shown only once."
    }
}
Modified at 2026-04-03 00:38:55
Previous
Request OTP code
Next
Project
Built with