Skip to main content

Authentication API

Lira uses JWT-based authentication with a 7-day token expiry. There are two auth paths: Platform Auth (for the web app) and Legacy Auth (API-key gated, internal use).

Platform Auth

All platform auth routes are under /v1/auth.

Register

POST /v1/auth/register

Create a new account with email and password.

FieldTypeRequiredValidation
emailstringYesValid email
passwordstringYes8–128 characters
namestringYes1–100 characters
companystringNo
curl -X POST https://api.creovine.com/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "sarah@acme.com",
"password": "securePass123!",
"name": "Sarah Chen",
"company": "Acme Corp"
}'

Login

POST /v1/auth/login

Authenticate with email and password.

curl -X POST https://api.creovine.com/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "sarah@acme.com",
"password": "securePass123!"
}'

Response:

{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"userId": "usr_abc123",
"email": "sarah@acme.com",
"name": "Sarah Chen"
}
}
}

Google Sign-In

POST /v1/auth/google

Exchange a Google Sign-In ID token for a Lira JWT. No prior registration required — the account is created automatically on first login.

FieldTypeRequiredDescription
credentialstringYesGoogle Sign-In ID token (minimum 1 character)
curl -X POST https://api.creovine.com/v1/auth/google \
-H "Content-Type: application/json" \
-d '{ "credential": "eyJhbGciOiJSUzI1NiIs..." }'

Response:

{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"userId": "usr_abc123",
"email": "sarah@acme.com",
"name": "Sarah Chen",
"picture": "https://lh3.googleusercontent.com/..."
}
}
}

Get Current User

GET /v1/auth/me

Returns the authenticated user's profile. Requires JWT in the Authorization header.

curl https://api.creovine.com/v1/auth/me \
-H "Authorization: Bearer <token>"

JWT Token

The JWT payload contains:

{
"sub": "usr_abc123",
"email": "sarah@acme.com",
"name": "Sarah Chen",
"orgs": ["org_xyz789"],
"iat": 1711711200,
"exp": 1712316000
}

Tokens expire after 7 days. After expiry, the user must re-authenticate.

Using the Token

Include the JWT in every API request via the Authorization header:

curl -X GET https://api.creovine.com/lira/v1/meetings \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

If the token is missing, expired, or invalid, the API returns:

{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token"
}
}

Legacy Auth

These routes require an API key header instead of (or in addition to) JWT. They are used internally and not recommended for new integrations.

MethodPathAuthDescription
POST/registerAPI keyRegister (email + password, 8–128 chars)
POST/loginAPI keyLogin (email + password)
GET/meJWT + API keyGet current user