Skip to main content
The auth endpoints handle user login, registration, and retrieving the authenticated user’s profile. The POST /api/login endpoint is used by the CLI and any application that needs to exchange credentials for a JWT. Base path: /api/v1/auth

GET /auth/me — get current user

Returns the profile of the authenticated user.

Response

id
integer
Internal user ID.
supabase_id
string
The user’s UUID in Supabase Auth.
email
string
The user’s email address.
role
string
Account role: user or admin.
plan
string
Subscription plan: community, starter, professional, or enterprise.

POST /login — sign in and get token

Signs in with email and password, and returns a JWT. Used by the CLI’s auth login command and non-Supabase client integrations.

Request body

email
string
required
The user’s email address.
password
string
required
The user’s password.
Example:

Response


POST /register — create an account

Creates a new user account and returns the same response as login.

Request body

email
string
required
Email address for the new account.
password
string
required
Password for the new account.
Example:

Response

Same structure as POST /login.
For refreshing an expired session token, use the Supabase client’s refreshSession() method. The InfraAudit API does not expose a dedicated refresh endpoint.