linxio-js
API Reference

Authentication

Login, OTP verification, token refresh, current user, and logout HTTP endpoints.

Authentication endpoints create and maintain the bearer token used by the rest of the API.

POST /login

POST

Create a session

/loginlinxio.auth.login(request)

Authenticates a Linxio user and returns a JWT token plus refresh token.

Request headers

application/json
required
Required when sending a JSON request body.

Request body parameters

string
required
Email address for the Linxio user.
string
required
Password for the Linxio user.
string
optional
Optional tenant-domain hint accepted by some login flows.

Response body fields

string
optional
JWT bearer token for authenticated requests.
string
optional
Refresh token for renewing the session.
ISODateString
optional
Token expiry timestamp when supplied by Linxio.
boolean
optional
Whether OTP must be completed before the session is usable.
string
optional
Team type such as client, reseller, or admin when supplied.
LinxioId
optional
Role identifier when supplied.

POST /login/otp

POST

Verify one-time password

/login/otplinxio.auth.verifyOtp(request)

Completes OTP verification when Linxio requires it for the account.

Request headers

application/json
required
Required when sending a JSON request body.

Request body parameters

string
required
Email address used for login.
string
required
One-time password code.

Response body fields

string
optional
JWT bearer token for authenticated requests.
string
optional
Refresh token for renewing the session.
ISODateString
optional
Token expiry timestamp when supplied by Linxio.

POST /token/refresh

POST

Refresh JWT auth token

/token/refreshlinxio.auth.refresh(refreshToken)

Exchanges a refresh token for a new JWT token.

Request headers

application/json
required
Required when sending a JSON request body.

Request body parameters

string
required
Refresh token returned by login or a previous refresh call.

Response body fields

string
optional
New JWT bearer token.
string
optional
New refresh token when Linxio rotates it.
ISODateString
optional
Token expiry timestamp when supplied by Linxio.

GET /me

GET

Get current user

/melinxio.auth.me(fields)

Returns the current authenticated user.

Request headers

Bearer token
required
JWT bearer token returned by login or token refresh.

Request query parameters

string[]
optional
Optional field projection for the current-user response.

Response body fields

LinxioId
optional
Current user ID when supplied.
string
optional
Current user email when supplied.
string
optional
Current user display name when supplied.
string
optional
Current team type when supplied.
string[]
optional
Permission keys when supplied.
object
optional
Current team details when supplied.

POST /logout

POST

Log out current session

/logoutlinxio.auth.logout()

Logs out the current session server-side.

Request headers

Bearer token
required
JWT bearer token returned by login or token refresh.
application/json
required
Required when sending a JSON request body.

Request body parameters

void
optional
Send an empty JSON object or no body.

Response headers

204 or JSON
optional
Linxio may return an empty success response.

On this page