The authentication endpoints let you create and destroy sessions, verify identities using WebAuthn passkeys, and authorize headless devices such as mobile apps or CLI connectors through a device-code flow. Every other API endpoint requires the Bearer token returned by a successful login.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gnmyt/Nexterm/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/auth/login
Authenticates a user with a username and password. If the account has TOTP (two-factor authentication) enabled, the current six-digit code must be included ascode.
Returns the session token in both the Authorization response header and the JSON body.
Request body
Account username. Maximum 255 characters.
Account password. Maximum 255 characters.
Six-digit TOTP code. Required when the account has two-factor authentication enabled.
Response
96-character hex session token. Also set in the
Authorization response header.Confirmation message.
POST /api/auth/logout
Invalidates a session token, logging out the associated user.Request body
The 96-character hex session token to invalidate.
Response
Confirmation that the session was deleted.
POST /api/auth/passkey/options
Retrieves WebAuthn authentication options needed to initiate a passkey login. Call this beforePOST /api/auth/passkey/verify.
Request body
The username of the account to authenticate.
The origin of the requesting application (e.g.
https://nexterm.example.com).Response
Returns a WebAuthnPublicKeyCredentialRequestOptions object to pass to navigator.credentials.get().
POST /api/auth/passkey/verify
Verifies a passkey authentication response produced by the browser’s WebAuthn API and creates a new session on success.Request body
The
AuthenticationResponseJSON object returned by navigator.credentials.get().The origin of the requesting application.
Response
Session token. Also set in the
Authorization response header.Confirmation message.
POST /api/auth/device/create
Creates a short-lived device authorization code for use in the mobile app or connector authentication flow. The code is displayed (or encoded as a QR) for the user to approve from the web interface. Rate-limited to 10 requests per hour per IP for unauthenticated callers.Request body
Type of client requesting authorization. Valid values:
mobile, connector.Response
Short alphanumeric code the user enters in the web interface.
Polling token used with
POST /api/auth/device/poll.POST /api/auth/device/poll
Polls for the authorization status of a pending device code. Call this repeatedly until the status changes frompending.
Request body
The polling token returned by
POST /api/auth/device/create.Response
Current authorization status. One of
pending, authorized, or invalid.Session token. Only present when
status is authorized.POST /api/auth/device/info
Retrieves information about a pending device code so the user can review device details before approving. Requires authentication.Request body
The device authorization code to look up.
Response
The type of client that created the code (
mobile or connector).IP address the device code request originated from.
User-agent string of the device.
POST /api/auth/device/authorize
Approves a pending device code, linking it to the authenticated user’s account. Once authorized, the device can retrieve a session token by polling. Requires authentication.Request body
The device authorization code to approve.
Response
Confirmation that the code was authorized.
POST /api/auth/device/link/status
Checks whether a device code created for QR-based linking has been claimed (polled and session retrieved) by the mobile app. Requires authentication.Request body
The device authorization code to check.
Response
One of
pending, authorized, claimed, or expired.GET /api/session/list
Returns all active sessions for the authenticated user, excluding the session used for the request itself. Useful for auditing connected devices. Requires authentication.Response
Returns an array of session objects.Session identifier.
IP address that created the session.
User-agent string of the client.
ISO 8601 timestamp of the last request made with this session.
DELETE /api/session/:id
Destroys a specific session by its ID, logging out that session across all devices. Requires authentication.Path parameters
The unique identifier of the session to destroy.