MATIH Platform is in active MVP development. Documentation reflects current implementation status.
6. Identity & Access Management
Overview

IAM API Reference

The IAM service exposes a comprehensive REST API for authentication, user management, role-based access control, multi-factor authentication, API key lifecycle, session management, device fingerprinting, OAuth2 client administration, and user impersonation. All endpoints are served on port 8081 under the /api/v1 prefix.


Base URL

https://:hostname/api/v1

All requests require the Content-Type: application/json header. Authenticated endpoints require a Bearer token in the Authorization header. Tenant-scoped endpoints require the X-Tenant-ID header.


Endpoint Groups

GroupBase PathEndpointsAuth Required
Auth Endpoints/api/v1/auth7No
User Endpoints/api/v1/users12Yes
Role Endpoints/api/v1/roles8Yes (Admin)
MFA Endpoints/api/v1/mfa12Yes
API Key Endpoints/api/v1/api-keys15Yes
Session Endpoints/api/v1/sessions5Yes
Device Endpoints/api/v1/devices9Yes
OAuth2 Endpoints/api/v1/oauth25Yes (Admin)
Impersonation Endpoints/api/v1/impersonation11Yes (Admin)

Common Headers

HeaderRequiredDescription
AuthorizationAuthenticated endpointsBearer followed by the JWT access token
X-Tenant-IDTenant-scoped endpointsUUID of the target tenant
Content-TypeAll POST/PUT/PATCHAlways application/json

Common Error Responses

StatusCodeDescription
400BAD_REQUESTInvalid request body or parameters
401UNAUTHORIZEDMissing or expired authentication token
403FORBIDDENInsufficient permissions for the operation
404NOT_FOUNDRequested resource does not exist
409CONFLICTResource already exists or state conflict
423LOCKEDAccount is locked due to failed login attempts
429TOO_MANY_REQUESTSRate limit exceeded

Pagination

Paginated endpoints accept standard Spring Data parameters:

ParameterTypeDefaultDescription
pageint0Zero-based page index
sizeint20Number of items per page
sortstringvariesSort field and direction (e.g., createdAt,desc)

Paginated responses include a Page wrapper with content, totalElements, totalPages, number, and size fields.