Download OpenAPI specification:
Authentication, users, roles, and tenants.
List API keys with pagination and filters
| search | string Search term (name or key_prefix) |
| status | Array of strings Status filter (active, revoked, expired) |
| service_account_id | string Filter by service account ID |
| page | integer Default: 1 Page number |
| page_size | integer Default: 10 Page size |
{- "data": {
- "items": [
- {
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "API key used for ERP data synchronization",
- "expires_at": "2025-12-31T23:59:59Z",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "key_prefix": "czk_a1b2c3d4",
- "last_used_at": "2025-06-15T10:30:00Z",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Sync Key",
- "service_account": {
- "code": "erp-connector",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "ERP Connector"
}, - "status": "active"
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new API key for a service account. The raw key is returned once.
API key creation request
| description | string <= 500 characters |
| expires_at | string |
| name required | string <= 255 characters |
| service_account_id required | string |
{- "description": "API key used for ERP data synchronization",
- "expires_at": "2025-12-31T23:59:59Z",
- "name": "ERP Sync Key",
- "service_account_id": "01J5C2D3E4F5G6H7I8J9K0L1M2"
}{- "data": {
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "API key used for ERP data synchronization",
- "expires_at": "2025-12-31T23:59:59Z",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "key_prefix": "czk_a1b2c3d4",
- "last_used_at": "2025-06-15T10:30:00Z",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Sync Key",
- "raw_key": "czk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
- "service_account": {
- "code": "erp-connector",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "ERP Connector"
}, - "status": "active"
}, - "success": true
}Retrieve an API key by ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 API Key ID |
{- "data": {
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "API key used for ERP data synchronization",
- "expires_at": "2025-12-31T23:59:59Z",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "key_prefix": "czk_a1b2c3d4",
- "last_used_at": "2025-06-15T10:30:00Z",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Sync Key",
- "service_account": {
- "code": "erp-connector",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "ERP Connector"
}, - "status": "active"
}, - "success": true
}Permanently delete an API key
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 API Key ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Update an API key's name or expiration
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 API Key ID |
Update request
| description | string <= 500 characters |
| expires_at | string |
| name | string <= 255 characters |
{- "description": "Updated description",
- "expires_at": "2026-06-30T23:59:59Z",
- "name": "Updated ERP Key"
}{- "data": {
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "API key used for ERP data synchronization",
- "expires_at": "2025-12-31T23:59:59Z",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "key_prefix": "czk_a1b2c3d4",
- "last_used_at": "2025-06-15T10:30:00Z",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Sync Key",
- "service_account": {
- "code": "erp-connector",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "ERP Connector"
}, - "status": "active"
}, - "success": true
}Change an API key's status (e.g., revoke)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 API Key ID |
Status change request
| status required | string Enum: "active" "revoked" |
{- "status": "revoked"
}{- "data": {
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "API key used for ERP data synchronization",
- "expires_at": "2025-12-31T23:59:59Z",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "key_prefix": "czk_a1b2c3d4",
- "last_used_at": "2025-06-15T10:30:00Z",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Sync Key",
- "service_account": {
- "code": "erp-connector",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "ERP Connector"
}, - "status": "active"
}, - "success": true
}Authenticate user and issue JWT tokens with default or specified tenant
Login credentials
| client_id required | string |
| email required | string |
| password required | string |
| tenant_id | string Optional: specify tenant |
{- "client_id": "pim_web",
- "email": "user@example.com",
- "password": "SecurePass123!",
- "tenant_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1"
}{- "data": {
- "access_token": "string",
- "expires_in": 0,
- "refresh_token": "string",
- "token_type": "string"
}, - "success": true
}Get current authenticated user information with roles, permissions, and tenants from Redis cache
{- "data": {
- "active_tenant": {
- "is_default": true,
- "organization_code": "acme",
- "organization_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4",
- "organization_name": "Acme Inc",
- "status": "active",
- "tenant_code": "tenant_001",
- "tenant_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1",
- "tenant_name": "Acme Corporation"
}, - "permissions": [
- "string"
], - "roles": [
- "string"
], - "tenants": [
- {
- "is_default": true,
- "organization_code": "acme",
- "organization_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4",
- "organization_name": "Acme Inc",
- "status": "active",
- "tenant_code": "tenant_001",
- "tenant_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1",
- "tenant_name": "Acme Corporation"
}
], - "user": {
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2",
- "name": "John Doe"
}
}, - "success": true
}Change current user's password
Password change request
| new_password required | string >= 8 characters |
| old_password required | string >= 8 characters |
{- "new_password": "NewSecurePass456!",
- "old_password": "OldPass123!"
}{- "data": null,
- "success": true
}Get a new access token using refresh token
Refresh token
| client_id required | string |
| refresh_token required | string |
{- "client_id": "pim_web",
- "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}{- "data": {
- "access_token": "string",
- "expires_in": 0,
- "token_type": "string"
}, - "success": true
}Switch the current user to another tenant they have access to without re-authentication
Switch tenant request
| client_id required | string |
| tenant_id required | string |
{- "client_id": "pim_web",
- "tenant_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d3"
}{- "data": {
- "access_token": "string",
- "expires_in": 0,
- "refresh_token": "string",
- "tenant_info": {
- "is_default": true,
- "organization_code": "string",
- "organization_id": "string",
- "organization_name": "string",
- "status": "string",
- "tenant_code": "string",
- "tenant_id": "string",
- "tenant_name": "string"
}, - "token_type": "string",
- "user": {
- "email": "string",
- "id": "string",
- "name": "string",
- "status": "string"
}
}, - "success": true
}Reset a user's password (admin only)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
Password reset request
| new_password required | string >= 8 characters |
| user_id required | string |
{- "new_password": "ResetPass789!",
- "user_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
}{- "data": null,
- "success": true
}Get a paginated list of features
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
| search | string Search term |
| status | Array of strings Filter by status |
{- "data": {
- "items": [
- {
- "code": "product_management",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Management",
- "permission_count": 15,
- "status": "active",
- "sub_feature_count": 5
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new feature in the system
Feature creation request
| code required | string |
{- "code": "product_management"
}{- "data": {
- "code": "product_management",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Manage product catalog and inventory",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Management",
- "permission_count": 15,
- "status": "active",
- "sub_feature_count": 5
}, - "success": true
}Get a feature by their ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Feature ID |
{- "data": {
- "code": "product_management",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Manage product catalog and inventory",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Management",
- "permission_count": 15,
- "status": "active",
- "sub_feature_count": 5
}, - "success": true
}Soft delete a feature
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Feature ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Change the status of a feature (activate/deactivate)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Feature ID |
Feature status change request
| status required | string Enum: "active" "inactive" |
{- "status": "active"
}{- "data": {
- "code": "product_management",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Manage product catalog and inventory",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Management",
- "permission_count": 15,
- "status": "active",
- "sub_feature_count": 5
}, - "success": true
}List all users that belong to any tenant within the specified organization
| org_id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Organization ID |
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
| search | string Search term |
| status | Array of strings Filter by status |
{- "data": {
- "items": [
- {
- "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "email": "string",
- "id": "string",
- "last_login_at": "string",
- "modified_at": "string",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "string",
- "roles": [
- {
- "code": "admin",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "name": "Administrator"
}
], - "status": "string"
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Get a paginated list of users scoped to the caller's JWT tenant
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
| search | string Search term |
| status | Array of strings Filter by status |
{- "data": {
- "items": [
- {
- "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "email": "string",
- "id": "string",
- "last_login_at": "string",
- "modified_at": "string",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "string",
- "roles": [
- {
- "code": "admin",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "name": "Administrator"
}
], - "status": "string"
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new user or assign an existing one to the caller's JWT tenant
Create/assign user request
string <= 255 characters New user fields (required when user_id is absent) | |
| name | string [ 1 .. 255 ] characters |
| password | string [ 6 .. 100 ] characters |
| role_ids | Array of strings Optional roles to assign (role IDs) |
| user_id | string Existing user — mutually exclusive with Email/Name |
{- "email": "john@company.com",
- "name": "John Doe",
- "password": "string",
- "role_ids": [
- "string"
], - "user_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
}{- "data": {
- "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "email": "string",
- "id": "string",
- "last_login_at": "string",
- "modified_at": "string",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "string",
- "roles": [
- {
- "code": "admin",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "name": "Administrator"
}
], - "status": "string"
}, - "success": true
}Get a user by their ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
{- "data": {
- "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "email": "string",
- "id": "string",
- "last_login_at": "string",
- "modified_at": "string",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "string",
- "roles": [
- {
- "code": "admin",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "name": "Administrator"
}
], - "status": "string"
}, - "success": true
}Remove a user from the caller's JWT tenant
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Update an existing user
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
User update request
string <= 255 characters | |
| name | string [ 1 .. 255 ] characters |
| role_ids | Array of strings Already optional with pointer |
{- "email": "jane.smith@example.com",
- "name": "Jane Smith",
- "role_ids": [
- "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e2"
]
}{- "data": {
- "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "email": "string",
- "id": "string",
- "last_login_at": "string",
- "modified_at": "string",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "string",
- "roles": [
- {
- "code": "admin",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "name": "Administrator"
}
], - "status": "string"
}, - "success": true
}Get all roles assigned to a user in the caller's JWT tenant
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
{- "data": {
- "items": [
- {
- "code": "admin",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Administrator",
- "permission_count": 20,
- "status": "active",
- "tenant": {
- "code": "acme",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1",
- "name": "Acme Corporation"
}
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Add roles to a user in the caller's JWT tenant. Uses PATCH semantics — adds to existing roles without removing them.
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
Role IDs to add
| role_ids required | Array of strings non-empty |
{- "role_ids": [
- "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e2"
]
}{- "data": null,
- "success": true
}Remove a single role from a user in the caller's JWT tenant
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
| role_id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M3 Role ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Change a user's status (activate or deactivate)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
Status change request
| status required | string Enum: "active" "inactive" "suspended" |
{- "status": "active"
}{- "data": {
- "created_at": "2024-01-01T00:00:00Z",
- "email": "user@example.com",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2",
- "last_login_at": "2024-01-15T10:30:00Z",
- "modified_at": "2024-01-10T12:00:00Z",
- "name": "John Doe",
- "status": "active"
}, - "success": true
}Get all tenants a user has access to
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 User ID |
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
{- "data": {
- "items": [
- {
- "billing_interval": "string",
- "code": "string",
- "contact_email": "string",
- "id": "string",
- "is_default": true,
- "name": "string",
- "organization_id": "string",
- "phone": "string",
- "plan": "string",
- "status": "string"
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}List permissions with pagination and filters
| feature_id | string Feature ID filter |
| sub_feature_id | string Sub-feature ID filter |
| search | string Search term |
| status | Array of strings Status filter |
| page | integer Default: 1 Page number |
| page_size | integer Default: 10 Page size |
{- "data": {
- "items": [
- {
- "code": "product_management.product_catalog.create",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8f1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Create Product",
- "status": "active",
- "sub_feature": {
- "code": "product_catalog",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "name": "Product Catalog"
}
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new permission
Permission creation request
| code required | string <= 100 characters |
{- "code": "iam:features:view"
}{- "data": {
- "code": "product_management.product_catalog.create",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Permission to create products",
- "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8f1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Create Product",
- "status": "active",
- "sub_feature": {
- "code": "product_catalog",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "name": "Product Catalog"
}
}, - "success": true
}Get a permission by ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Permission ID |
{- "data": {
- "code": "product_management.product_catalog.create",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Permission to create products",
- "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8f1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Create Product",
- "status": "active",
- "sub_feature": {
- "code": "product_catalog",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "name": "Product Catalog"
}
}, - "success": true
}Soft delete a permission
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Permission ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Change a permission's status
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Permission ID |
Permission status change request
| status required | string Enum: "active" "inactive" |
{- "status": "active"
}{- "data": {
- "code": "product_management.product_catalog.create",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Permission to create products",
- "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8f1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Create Product",
- "status": "active",
- "sub_feature": {
- "code": "product_catalog",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "name": "Product Catalog"
}
}, - "success": true
}List roles with pagination and filters
| tenant_id | string Tenant ID filter (must be in user's accessible tenants) |
| search | string Search term |
| status | Array of strings Status filter |
| page | integer Default: 1 Page number |
| page_size | integer Default: 10 Page size |
{- "data": {
- "items": [
- {
- "code": "admin",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Administrator",
- "permission_count": 20,
- "status": "active",
- "tenant": {
- "code": "acme",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1",
- "name": "Acme Corporation"
}, - "user_count": 5
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new role
Role creation request
| code required | string |
| description | string |
| name required | string <= 255 characters |
| permission_ids | Array of strings |
{- "code": "admin",
- "description": "Full system access",
- "name": "Administrator",
- "permission_ids": [
- "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8f1",
- "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8f2"
]
}{- "data": {
- "code": "admin",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Full system access",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Administrator",
- "status": "active"
}, - "success": true
}Get a role by ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
{- "data": {
- "code": "admin",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Full system access",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Administrator",
- "status": "active"
}, - "success": true
}Soft delete a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Update a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
Role update request
| description | string |
| name | string |
{- "description": "Updated description",
- "name": "Super Administrator"
}{- "data": {
- "code": "admin",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Full system access",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Administrator",
- "status": "active"
}, - "success": true
}Get all permissions assigned to a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
{- "data": {
- "items": [
- {
- "code": "string",
- "description": "string",
- "feature": {
- "code": "string",
- "id": "string",
- "name": "string"
}, - "id": "string",
- "name": "string",
- "status": "string",
- "sub_feature": {
- "code": "string",
- "id": "string",
- "name": "string"
}
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Assign permissions to a role (adds to existing) Remove a single permission from a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
Permissions to assign
| permission_ids required | Array of strings non-empty |
{- "permission_ids": [
- "string"
]
}{- "data": null,
- "success": true
}Assign permissions to a role (adds to existing) Remove a single permission from a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
Permissions to assign
| permission_ids required | Array of strings non-empty |
{- "permission_ids": [
- "string"
]
}{- "data": null,
- "success": true
}Assign permissions to a role (adds to existing) Remove a single permission from a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| permission_id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Permission ID |
Permissions to assign
| permission_ids required | Array of strings non-empty |
{- "permission_ids": [
- "string"
]
}{- "data": null,
- "success": true
}Assign permissions to a role (adds to existing) Remove a single permission from a role
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
| permission_id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Permission ID |
Permissions to assign
| permission_ids required | Array of strings non-empty |
{- "permission_ids": [
- "string"
]
}{- "data": null,
- "success": true
}Change a role's status (activate or deactivate)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Role ID |
Status change request
| status required | string Enum: "active" "inactive" |
{- "status": "active"
}{- "data": {
- "code": "admin",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Full system access",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Administrator",
- "status": "active"
}, - "success": true
}List service accounts with pagination and filters
| search | string Search term (name or code) |
| status | Array of strings Status filter (active, inactive) |
| page | integer Default: 1 Page number |
| page_size | integer Default: 10 Page size |
{- "data": {
- "items": [
- {
- "api_key_count": 2,
- "code": "erp-connector",
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Connector",
- "roles": [
- {
- "code": "admin",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "Administrator"
}
], - "status": "active"
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new service account (machine identity)
Service account creation request
| code required | string |
| description | string |
| name required | string <= 255 characters |
| role_ids | Array of strings |
{- "code": "erp-connector",
- "description": "Service account for ERP integration",
- "name": "ERP Connector",
- "role_ids": [
- "01J5C2D3E4F5G6H7I8J9K0L1M2"
]
}{- "data": {
- "code": "erp-connector",
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Service account for ERP integration",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Connector",
- "roles": [
- {
- "code": "admin",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "Administrator"
}
], - "status": "active"
}, - "success": true
}Retrieve a service account by ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Service Account ID |
{- "data": {
- "code": "erp-connector",
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Service account for ERP integration",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Connector",
- "roles": [
- {
- "code": "admin",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "Administrator"
}
], - "status": "active"
}, - "success": true
}Delete a service account and its role mappings
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Service Account ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Update a service account's name or description
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Service Account ID |
Update request
| description | string |
| name | string <= 255 characters |
| role_ids | Array of strings |
{- "description": "Updated description",
- "name": "Updated ERP Connector",
- "role_ids": [
- "01J5C2D3E4F5G6H7I8J9K0L1M2"
]
}{- "data": {
- "code": "erp-connector",
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Service account for ERP integration",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Connector",
- "roles": [
- {
- "code": "admin",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "Administrator"
}
], - "status": "active"
}, - "success": true
}Change a service account's status (activate or deactivate)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Service Account ID |
Status change request
| status required | string Enum: "active" "inactive" |
{- "status": "active"
}{- "data": {
- "code": "erp-connector",
- "created_at": "2025-01-15T08:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Service account for ERP integration",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "modified_at": "2025-01-16T10:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "ERP Connector",
- "roles": [
- {
- "code": "admin",
- "id": "01J5C2D3E4F5G6H7I8J9K0L1M2",
- "name": "Administrator"
}
], - "status": "active"
}, - "success": true
}Get a paginated list of sub-features
| feature_id | string Filter by feature ID |
| page | integer Default: 1 Page number |
| page_size | integer Default: 20 Page size |
| search | string Search term |
| status | Array of strings Filter by status |
{- "data": {
- "items": [
- {
- "code": "product_catalog",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Catalog",
- "permission_count": 8,
- "status": "active"
}
], - "pagination": {
- "has_next": true,
- "page": 0,
- "page_size": 0,
- "total_items": 0,
- "total_pages": 0
}
}, - "success": true
}Create a new sub-feature in the system
Sub-feature creation request
| code required | string |
{- "code": "product_catalog"
}{- "data": {
- "code": "product_catalog",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Manage product catalog entries",
- "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Catalog",
- "permission_count": 8,
- "status": "active"
}, - "success": true
}Get a sub-feature by its ID
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Sub-Feature ID |
{- "data": {
- "code": "product_catalog",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Manage product catalog entries",
- "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Catalog",
- "permission_count": 8,
- "status": "active"
}, - "success": true
}Soft delete a sub-feature
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Sub-Feature ID |
{- "errors": [
- {
- "code": "string",
- "field": "string",
- "message": "string"
}
], - "message": "string",
- "success": true
}Change the status of a sub-feature (activate/deactivate)
| id required | string Example: 01J5C2D3E4F5G6H7I8J9K0L1M2 Sub-Feature ID |
Sub-feature status change request
| status required | string Enum: "active" "inactive" |
{- "status": "active"
}{- "data": {
- "code": "product_catalog",
- "created_at": "2024-01-01T00:00:00Z",
- "created_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "description": "Manage product catalog entries",
- "feature": {
- "code": "product_management",
- "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8b1",
- "name": "Product Management"
}, - "id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1",
- "modified_at": "2024-01-10T12:00:00Z",
- "modified_by": {
- "id": "string",
- "name": "string",
- "type": "user"
}, - "name": "Product Catalog",
- "permission_count": 8,
- "status": "active"
}, - "success": true
}