Authentication
API key authentication for the Liya Engine REST API, dashboard JWT flow, and key management.
API Key Authentication
All /v1/* endpoints require an API key passed in the x-api-key request header.
API keys are scoped to your tenant and carry all domain and intent permissions associated with your account.
Key format
Keys are prefixed with liya_ followed by a random 32-byte token. The full key is only shown once — at creation or rotation. The dashboard shows a masked preview (e.g. liya_F9y-...o4k) for identification.
Getting your key
- Sign up at app.liyaengine.ai/dashboard
- Verify your email address
- Your API key is generated automatically on account creation — copy it from the API Keys page before leaving
Rotating your key
Rotating generates a new key and immediately invalidates the old one. The full key is returned once in the response — save it.
Dashboard Authentication (JWT)
The dashboard web app (app.liyaengine.ai/dashboard) uses email/password login and issues a short-lived JWT for dashboard API calls.
Signup
Response
The apiKey is only returned at signup. Store it securely. A verification email is sent automatically — the dashboard enforces email verification before full access.
Login
JWT usage
Pass the JWT as a Bearer token for all /dashboard/* endpoints:
JWTs expire after 7 days by default. Call GET /auth/me to refresh.
Error codes
| Code | HTTP | Meaning |
|---|---|---|
INVALID_API_KEY | 401 | Key missing or not recognised |
API_KEY_REVOKED | 401 | Key was rotated or manually revoked |
DOMAIN_NOT_ENABLED | 403 | Domain not in your tenant's enabled_domains |
INTENT_NOT_PERMITTED | 403 | Intent disabled for your tenant |
INVALID_CREDENTIALS | 401 | Wrong email or password |
ACCOUNT_INACTIVE | 403 | Account deactivated — contact support |
EMAIL_TAKEN | 409 | Account already exists for this email |