Skip to main content

Overview

The UTMStack Authentication API issues JWT tokens to clients who provide valid credentials. Clients must authenticate using this endpoint before calling any protected resource in the UTMStack platform.
This endpoint does not require authentication. It returns a JWT access token that must be used for subsequent requests.

Endpoint Details

POST /api/authenticate

Method: POST
Content-Type: application/json
Authentication: Not required
Response: JWT token for API access

Parameters

Request Body

string
required
User login name or email address
string
required
User password
boolean
default:"false"
Optional. Keeps the session active for a longer period

JSON Schema (Request)


Response Examples

Successful Authentication (TFA disabled)

TFA Challenge (TFA enabled)

When authenticated is false, you need to complete the two-factor authentication process by providing the verification code sent to your email.

JSON Schema (Response)


Request & Response Examples

Additional Code Examples


Status Codes

OK
Authentication successful. Token returned.
Unauthorized
Invalid username or password.
Forbidden
Login blocked (too many attempts).
Too Many Requests
Rate limit exceeded.
Internal Server Error
Unexpected issue during authentication.

Error Handling

Description: Invalid credentials
Resolution: Verify username/password and try again.
Description: Login temporarily blocked due to multiple failed attempts
Resolution: Wait for cooldown period or contact admin.
Description: Unexpected backend error
Resolution: Check logs or contact UTMStack support.

Security Considerations

Important Security Notes:
  • Always use HTTPS (TLS) when sending credentials
  • Do not store plain-text passwords or tokens locally
  • Implement token expiration and refresh mechanisms in clients
  • If TFA is enabled, a second verification code is sent by email

Using the Token

After successful authentication, include the JWT token in the Authorization header for subsequent API requests:
Test your authentication by making a request to /api/elasticsearch/search with your Bearer token to verify it’s working correctly.

OpenAPI Specification