ClickCease

Leni HTTP API

Authentication and errors

Authenticate every HTTP API request with a project API key. The key is the user and organization security principal.

MethodValue
Preferred headerX-Api-Key: <project-key>
Bearer headerAuthorization: Bearer <project-key>

Identity is server-owned

Client-supplied user or organization identifiers cannot impersonate another account. Query-string API keys are not supported; keep keys out of URLs and logs.

Common status codes

StatusMeaning
400Invalid path, query, or body fields.
202The analysis was durably accepted and is still running. Poll using the returned identifiers.
401Missing, invalid, or revoked project API key.
402Sandbox quota or funded production credit is unavailable.
404The requested owner-scoped resource does not exist or is not accessible.
429Per-key rate limit exceeded. Respect the Retry-After header.
500 / 502Leni or an upstream dependency could not complete the request. Retry only idempotent operations.
curl -sS "https://api.prod.ca-central-1.leni.co/users/custom-analysts" \
  -H "X-Api-Key: $LENI_API_KEY"