The Termix API supports two authentication methods: short-lived JWTs issued at login, and long-lived API keys created through the admin panel. Both are passed the same way — as anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Termix-SSH/Termix/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer header. You can also use the jwt cookie that the login endpoint sets automatically, which is convenient for browser-based clients.
Method 1 — Login to get a JWT
Send aPOST request to /users/login with your username and password. On success, Termix returns a JSON body and sets a jwt cookie. You can use either the cookie (for browser requests) or extract the token from the Set-Cookie header for programmatic use.
Read the response
A successful login returns HTTP 200 with the following body and a The JWT is set as an
Set-Cookie: jwt=... header:httpOnly cookie named jwt. Its maxAge is 24 hours by default, or 30 days if rememberMe is true.Login request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | The account username. |
password | string | Yes | The account password. |
rememberMe | boolean | No | Extend the session to 30 days instead of the default 24 hours. |
Login error codes
| Status | Meaning |
|---|---|
400 | username or password is missing or empty. |
401 | Credentials are wrong, or the session has expired. |
403 | Password authentication is disabled on this instance, or the account uses OIDC-only login. |
429 | Too many failed attempts from this IP or for this username. The response includes remainingTime in milliseconds. |
500 | Internal error — check the Termix logs. |
TOTP (two-factor authentication)
If the account has TOTP enabled and the device is not trusted, the login response returns a temporary token instead of a full session token:POST /users/totp/verify with the temp_token before you receive a usable session token.
Method 2 — API keys
API keys are long-lived tokens suitable for automation, scripts, and CI/CD. They are managed by admins at Settings → API Keys in the Termix UI, or via the API atPOST /users/api-keys.
All Termix API keys start with the prefix tmx_. The full token is shown only once when created and is never retrievable again.
Creating an API key
Using an API key
Pass the API key as a Bearer token exactly like a JWT:API keys do not carry a user session and do not unlock the user’s encrypted data key. If you need to access encrypted SSH credentials, use a JWT obtained through the normal login flow instead.
API key expiry
When you create a key, theexpiresAt field is optional. Omitting it creates a key that never expires. If you provide a date, the key stops working after that timestamp and returns 401 API key has expired.
OIDC users
Users who sign in through an OIDC provider (such as Authentik, Keycloak, or Auth0) can also generate API keys from the admin panel. Their API keys work identically to those of password-based users.Token usage reference
Error reference
| Status | Code in body | Meaning |
|---|---|---|
401 | — | Token is missing, invalid, or expired. |
401 | SESSION_EXPIRED | The session associated with this JWT has expired. |
401 | SESSION_NOT_FOUND | The session was revoked (e.g., user logged out on another device). |
401 | TOTP_REQUIRED | The token is a pending TOTP token; complete verification first. |
403 | — | Valid token, but the account lacks the required permissions. |
429 | — | Rate-limited on the login endpoint. |