Log in and obtain tokens
const url = 'https://api.aletheia-ops.com/api/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aletheia-ops.com/api/v1/auth/login \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "password": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Authenticates an existing user
object
Examplegenerated
{ "email": "example", "password": "example"}Responses
Section titled “Responses”OK
Token-issuance response for signup/login/refresh/accept
object
Public shape of a user account (never includes the password hash)
object
Public shape of an organization
object
object
Examplegenerated
{ "access_token": "example", "refresh_token": "example", "access_expires_at": "2026-04-15T12:00:00Z", "refresh_expires_at": "2026-04-15T12:00:00Z", "user": { "id": "example", "email": "example", "name": "example", "status": "example", "created_at": "2026-04-15T12:00:00Z" }, "organization": { "id": "example", "name": "example", "slug": "example", "settings": {}, "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z" }, "roles": [ "example" ]}The request is malformed or fails validation.
object
Stable, machine-readable identifier. Branch on this.
Human-readable explanation. Safe to display; do not parse.
Examples
{ "code": "validation_failed", "message": "name: must not be blank"}{ "code": "invalid_state", "message": "invalid or expired install state"}{ "code": "unsafe_base_url", "message": "base URL is not permitted"}{ "code": "invalid_body", "message": "could not read request body"}The request conflicts with the current state.
object
Stable, machine-readable identifier. Branch on this.
Human-readable explanation. Safe to display; do not parse.
Examples
{ "code": "email_taken", "message": "an account with this email already exists"}{ "code": "slug_taken", "message": "organization slug already taken"}{ "code": "name_taken", "message": "a connection with this name already exists"}{ "code": "account_exists", "message": "this AWS account is already connected"}{ "code": "connection_exists", "message": "a connection for this organization already exists"}{ "code": "scan_conflict", "message": "an equivalent scan is already queued or running"}{ "code": "invitation_invalid", "message": "this invitation is no longer valid"}{ "code": "last_admin", "message": "the organization must keep at least one active platform administrator"}{ "code": "conflict", "message": "a resource with this identifier already exists"}{ "code": "turn_in_progress", "message": "a turn is already in progress on this conversation"}Too many attempts. Back off and retry.
object
Stable, machine-readable identifier. Branch on this.
Human-readable explanation. Safe to display; do not parse.
Examples
{ "code": "rate_limited", "message": "too many attempts; please try again later"}An unexpected failure. Diagnostic detail is logged server-side and
deliberately not returned. Quote the X-Request-Id response header when
reporting one.
object
Stable, machine-readable identifier. Branch on this.
Human-readable explanation. Safe to display; do not parse.
Examples
{ "code": "internal_error", "message": "internal server error"}