Download OpenAPI specification:Download
The PrimeForge Auth Service provides comprehensive authentication and authorization capabilities for the PrimeForge platform.
Most endpoints require JWT authentication. Include the access token in the Authorization header:
Authorization: Bearer <your_access_token>
| email required | string The email address to register with |
| password required | string The password to register with |
| first_name | string First name of the user |
| last_name | string Last name of the user |
{- "email": "user@example.com",
- "password": "Password123!",
- "first_name": "John",
- "last_name": "Doe"
}{- "user": {
- "id": "string",
- "email": "string",
- "role": "string",
- "verified": true,
- "first_name": "string",
- "last_name": "string",
- "solo_org_id": "string",
- "solo_org_name": "string"
}, - "message": "Registration successful"
}| identifier required | string The identifier to login with |
| password required | string The password to login with |
| rememberMe | boolean Whether to remember the user |
| deviceId | string The device ID to login with |
{- "identifier": "user@example.com",
- "password": "password123",
- "rememberMe": true,
- "deviceId": "device-123"
}{- "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expires_in": 3600,
- "user": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "email": "user@example.com",
- "username": "johndoe",
- "phone": "+1234567890",
- "first_name": "John",
- "preferred_name": "Johnny",
- "last_name": "Doe",
- "verified": true,
- "phone_verified": false,
- "status": "ACTIVE",
- "language": "en",
- "timezone": "UTC",
- "title": "MR",
- "solo_org_id": "123e4567-e89b-12d3-a456-426614174000",
- "default_org_id": "123e4567-e89b-12d3-a456-426614174000",
- "solo_org": {
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "status": "PLAN_ACTIVE"
}, - "memberships": [
- [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "role": "MEMBER",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "organization": {
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "status": "PLAN_ACTIVE"
}, - "created_at": "2023-12-01T00:00:00.000Z",
- "updated_at": "2023-12-01T00:00:00.000Z"
}
]
], - "created_at": "2023-12-01T00:00:00.000Z",
- "updated_at": "2023-12-01T00:00:00.000Z"
}
}| refresh_token required | string The refresh token to refresh |
{- "refresh_token": "1234567890"
}{- "access_token": "1234567890",
- "refresh_token": "1234567890",
- "expires_in": 3600
}| token required | string The reset token received via email |
| newPassword required | string The new password to set |
| confirmPassword required | string Confirmation of the new password |
{- "token": "1234567890",
- "newPassword": "NewPassword123!",
- "confirmPassword": "NewPassword123!"
}{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "email": "user@example.com",
- "username": "johndoe",
- "phone": "+1234567890",
- "first_name": "John",
- "preferred_name": "Johnny",
- "last_name": "Doe",
- "verified": true,
- "phone_verified": false,
- "status": "ACTIVE",
- "language": "en",
- "timezone": "UTC",
- "title": "MR",
- "solo_org_id": "123e4567-e89b-12d3-a456-426614174000",
- "default_org_id": "123e4567-e89b-12d3-a456-426614174000",
- "solo_org": {
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "status": "PLAN_ACTIVE"
}, - "memberships": [
- [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "role": "MEMBER",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "organization": {
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "status": "PLAN_ACTIVE"
}, - "created_at": "2023-12-01T00:00:00.000Z",
- "updated_at": "2023-12-01T00:00:00.000Z"
}
]
], - "created_at": "2023-12-01T00:00:00.000Z",
- "updated_at": "2023-12-01T00:00:00.000Z"
}| username | string [ 3 .. 50 ] characters Username |
| first_name | string <= 50 characters First name |
| preferred_name | string <= 50 characters Preferred name |
| last_name | string <= 50 characters Last name |
| language | string Enum: "en" "zh" "es" "fr" "de" "ja" "ko" Language preference |
| timezone | string Timezone |
| title | string Enum: "MR" "MRS" "MS" "DR" "PROF" "OTHER" User title |
| phone | string Phone number |
{- "username": "johndoe",
- "first_name": "John",
- "preferred_name": "Johnny",
- "last_name": "Doe",
- "language": "en",
- "timezone": "UTC",
- "title": "MR",
- "phone": "+1234567890"
}{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "email": "user@example.com",
- "username": "johndoe",
- "phone": "+1234567890",
- "first_name": "John",
- "preferred_name": "Johnny",
- "last_name": "Doe",
- "verified": true,
- "phone_verified": false,
- "status": "ACTIVE",
- "language": "en",
- "timezone": "UTC",
- "title": "MR",
- "solo_org_id": "123e4567-e89b-12d3-a456-426614174000",
- "default_org_id": "123e4567-e89b-12d3-a456-426614174000",
- "solo_org": {
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "status": "PLAN_ACTIVE"
}, - "memberships": [
- [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "role": "MEMBER",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "organization": {
- "tenant_id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "status": "PLAN_ACTIVE"
}, - "created_at": "2023-12-01T00:00:00.000Z",
- "updated_at": "2023-12-01T00:00:00.000Z"
}
]
], - "created_at": "2023-12-01T00:00:00.000Z",
- "updated_at": "2023-12-01T00:00:00.000Z"
}Switch to a different organization and get new JWT tokens
| tenant_id required | string Target organization tenant ID to switch to |
{- "tenant_id": "27aee4a6-cdeb-4924-a6f5-2d915ce63a4e"
}{- "status": "success",
- "message": "Organization switched successfully",
- "access_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refresh_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expires_in": 900,
- "tenant_id": "27aee4a6-cdeb-4924-a6f5-2d915ce63a4e"
}| name required | string [ 2 .. 100 ] characters Organization name |
| slug required | string [ 2 .. 50 ] characters Organization slug for URLs |
| region required | string |
| description | string <= 500 characters Organization description |
| website | string Organization website |
| logo | string Organization logo URL |
{- "name": "Acme Corporation",
- "slug": "acme-corp",
- "region": "UK",
- "description": "A leading technology company",
}{- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "description": "A leading technology company",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z"
}| id required | string Organization ID |
{- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "description": "A leading technology company",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z"
}| id required | string Organization ID |
| name | string [ 2 .. 100 ] characters |
| slug required | string [ 2 .. 50 ] characters Organization slug for URLs |
| description | string <= 500 characters |
| website | string |
| logo | string |
| openJoin | boolean Whether users can join the organization |
| openInvite | boolean Whether users can invite others to the organization |
{- "name": "Acme Corporation",
- "slug": "acme-corp",
- "description": "A leading technology company",
- "openJoin": true,
- "openInvite": true
}{- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "description": "A leading technology company",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z"
}| slug required | string Organization slug |
{- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "description": "A leading technology company",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z"
}| id required | string Organization ID |
| limit | any Items per page (default: 20) |
| page | any Page number (default: 1) |
{- "data": [
- {
- "id": "member-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "joinedAt": "2024-01-01T00:00:00Z",
- "user": {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
}
], - "pagination": {
- "page": 1,
- "limit": 20,
- "total": 100,
- "totalPages": 5
}
}| id required | string Organization ID |
| email required | string Email address of the user to invite |
| role required | string Default: "MEMBER" Enum: "OWNER" "ADMIN" "MEMBER" Role to assign to the invited user |
| message | string <= 500 characters Optional message to include in the invitation |
{- "email": "user@example.com",
- "role": "OWNER",
- "message": "Welcome to our organization!"
}{- "id": "invitation-uuid",
- "email": "user@example.com",
- "role": "MEMBER",
- "status": "PENDING",
- "expiresAt": "2024-01-08T00:00:00Z",
- "createdAt": "2024-01-01T00:00:00Z",
- "inviter": {
- "id": "inviter-uuid",
- "email": "admin@example.com",
- "firstName": "Admin",
- "lastName": "User"
}
}| id required | string Organization ID |
required | Array of objects (InviteMemberDto) Array of invitations (max 50) |
| message | string |
{- "members": [
- {
- "email": "user@example.com",
- "role": "OWNER",
- "message": "Welcome to our organization!"
}
], - "message": "string"
}| id required | string Organization ID |
| memberId required | string Member ID |
| role required | string Enum: "OWNER" "ADMIN" "MEMBER" New role for the member |
{- "role": "OWNER"
}{- "id": "member-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "joinedAt": "2024-01-01T00:00:00Z",
- "user": {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
}| id required | string Organization ID |
| memberId required | string Member ID |
| app_roles required | Array of arrays Application roles to assign to the member |
{- "app_roles": [
- "admin",
- "editor",
- "viewer"
]
}{- "id": "member-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "joinedAt": "2024-01-01T00:00:00Z",
- "user": {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
}| id required | string Organization ID |
| limit | any Items per page (default: 20) |
| page | any Page number (default: 1) |
{- "data": [
- {
- "id": "invitation-uuid",
- "email": "user@example.com",
- "role": "MEMBER",
- "status": "PENDING",
- "expiresAt": "2024-01-08T00:00:00Z",
- "createdAt": "2024-01-01T00:00:00Z",
- "inviter": {
- "id": "inviter-uuid",
- "email": "admin@example.com",
- "firstName": "Admin",
- "lastName": "User"
}
}
], - "pagination": {
- "page": 1,
- "limit": 20,
- "total": 100,
- "totalPages": 5
}
}| id required | string Organization ID |
| newOwnerId required | string ID of the user to transfer ownership to |
{- "newOwnerId": "user-uuid"
}{- "id": "member-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "app_roles": [
- "admin",
- "editor",
- "viewer"
], - "joinedAt": "2024-01-01T00:00:00Z",
- "user": {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
}Admin login
| email required | string Admin email address |
| password required | string Admin password |
{- "email": "admin@prime-forge.com",
- "password": "AdminP@ssw0rd!123#"
}{- "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "admin": {
- "id": "admin-uuid",
- "email": "admin@prime-forge.com",
- "role": "SUPER_ADMIN"
}, - "expiresIn": 3600
}Refresh admin access token
| refreshToken required | string Admin refresh token |
{- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}{- "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 3600
}Change admin password
| currentPassword required | string Current admin password |
| newPassword required | string New admin password (minimum 8 characters) |
| confirmPassword required | string Confirm new password |
{- "currentPassword": "CurrentAdminP@ssw0rd!",
- "newPassword": "NewAdminP@ssw0rd!123#",
- "confirmPassword": "NewAdminP@ssw0rd!123#"
}{- "message": "string"
}Request admin password reset
| email required | string Admin email address for password reset |
{- "email": "admin@prime-forge.com"
}{- "message": "string"
}Confirm admin password reset with token
| token required | string Password reset token |
| newPassword required | string New admin password (minimum 8 characters) |
| confirmPassword required | string Confirm new password |
{- "token": "reset-token-uuid",
- "newPassword": "NewAdminP@ssw0rd!123#",
- "confirmPassword": "NewAdminP@ssw0rd!123#"
}{- "message": "string"
}Get all users with pagination and filtering
| search | string Search term for email, first name, or last name |
| role | string Filter by user role |
| status | string Enum: "ACTIVE" "INACTIVE" "SUSPENDED" "PENDING" Filter by user status |
| limit | number Example: limit=20 Items per page |
| page | number Example: page=1 Page number |
{- "users": [
- {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "preferredName": "Johnny",
- "lastName": "Doe",
- "primaryRole": "ADMIN",
- "status": "ACTIVE",
- "organizationId": "org-uuid",
- "organizationName": "Acme Corp",
- "emailVerified": true,
- "phone": "1234567890",
- "phoneVerified": true,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z",
- "organizations": [
- {
- "tenantId": "tenant-uuid",
- "name": "Acme Corp",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE"
}
], - "memberships": [
- {
- "tenantId": "tenant-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "joinedAt": "2024-01-01T00:00:00Z",
- "organizationName": "Acme Corp"
}
]
}
], - "total": 10,
- "page": 1,
- "totalPages": 10
}Create new user
| email required | string |
| firstName | string |
| lastName | string |
| region | string |
| sendWelcomeEmail required | boolean Default: true |
{- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
- "region": "UK",
- "sendWelcomeEmail": true
}Get user by ID
| id required | string |
{- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "preferredName": "Johnny",
- "lastName": "Doe",
- "primaryRole": "ADMIN",
- "status": "ACTIVE",
- "organizationId": "org-uuid",
- "organizationName": "Acme Corp",
- "emailVerified": true,
- "phone": "1234567890",
- "phoneVerified": true,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z",
- "organizations": [
- {
- "tenantId": "tenant-uuid",
- "name": "Acme Corp",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE"
}
], - "memberships": [
- {
- "tenantId": "tenant-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "joinedAt": "2024-01-01T00:00:00Z",
- "organizationName": "Acme Corp"
}
]
}Update user
| id required | string |
| firstName | string |
| lastName | string |
| preferredName | string Preferred name of the user |
| status | string Enum: "ACTIVE" "INACTIVE" "SUSPENDED" "PENDING" |
| organizationId | object |
| verified | boolean |
| phone_verified | boolean |
{- "firstName": "string",
- "lastName": "string",
- "preferredName": "string",
- "status": "ACTIVE",
- "organizationId": { },
- "verified": true,
- "phone_verified": true
}{- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "preferredName": "Johnny",
- "lastName": "Doe",
- "primaryRole": "ADMIN",
- "status": "ACTIVE",
- "organizationId": "org-uuid",
- "organizationName": "Acme Corp",
- "emailVerified": true,
- "phone": "1234567890",
- "phoneVerified": true,
- "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z",
- "organizations": [
- {
- "tenantId": "tenant-uuid",
- "name": "Acme Corp",
- "region": "us-east-1",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE"
}
], - "memberships": [
- {
- "tenantId": "tenant-uuid",
- "role": "ADMIN",
- "status": "ACTIVE",
- "joinedAt": "2024-01-01T00:00:00Z",
- "organizationName": "Acme Corp"
}
]
}Reset user password. If no new password is provided, a secure password will be generated automatically.
| id required | string Example: user-uuid-123 User ID |
| newPassword | string New password for the user. If not provided, a secure password will be generated automatically. |
{- "newPassword": "NewP@ssw0rd123!"
}{- "message": "Password reset successfully",
- "newPassword": "GeneratedP@ssw0rd123!"
}Paginated organization list
| search | string Search term for organization name |
| limit | number Example: limit=20 Items per page |
| page | number Example: page=1 Page number |
{- "organizations": [
- {
- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "region": "UK",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "members": [
- {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
], - "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z",
- "createdBy": "admin-uuid",
- "updatedBy": "admin-uuid"
}
], - "total": 10,
- "page": 1,
- "totalPages": 10
}Organization details with all member data
| id required | string Organization tenant ID |
{- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "region": "UK",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "members": [
- {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
], - "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z",
- "createdBy": "admin-uuid",
- "updatedBy": "admin-uuid"
}Update organization (especially status field)
| id required | string Organization tenant ID |
| name | string [ 2 .. 100 ] characters Organization name |
| region | string Organization region |
| orgType | string Enum: "SOLO" "BUSINESS" Organization type |
| plan | string Enum: "SOLO_FREE" "SOLO_TRIAL" "SOLO_MONTHLY" "SOLO_ANNUAL" "TEAM_STARTER" "TEAM_GROWTH" "ENTERPRISE" Organization plan |
| status | string Enum: "PLAN_ACTIVE" "PLAN_EXPIRED" "SUSPENDED" "FREEZE" Organization status |
| planExpiresAt | string <date-time> Plan expiration date |
| openJoin | boolean Whether users can join the organization |
| openInvite | boolean Whether users can invite others to the organization |
| maxMembers | number >= 1 Maximum number of members |
| maxActiveMembers | number >= 1 Maximum number of active members |
| subscription | object Subscription data (JSON object) |
{- "name": "Acme Corporation",
- "region": "us-east-1",
- "orgType": "SOLO",
- "plan": "SOLO_FREE",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 100,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}
}{- "tenantId": "tenant-uuid",
- "name": "Acme Corporation",
- "slug": "acme-corp",
- "region": "UK",
- "orgType": "BUSINESS",
- "plan": "TEAM_STARTER",
- "status": "PLAN_ACTIVE",
- "planExpiresAt": "2024-12-31T23:59:59Z",
- "openJoin": true,
- "openInvite": true,
- "maxMembers": 100,
- "maxActiveMembers": 50,
- "subscription": {
- "subscriptionId": "sub_123",
- "customerId": "cus_456"
}, - "memberCount": 25,
- "members": [
- {
- "id": "user-uuid",
- "email": "user@example.com",
- "firstName": "John",
- "lastName": "Doe",
}
], - "createdAt": "2024-01-01T00:00:00Z",
- "updatedAt": "2024-01-01T00:00:00Z",
- "createdBy": "admin-uuid",
- "updatedBy": "admin-uuid"
}Get all system configurations
[- {
- "id": "config-uuid",
- "key": "email_verification_base_url",
- "type": "STRING",
- "description": "Base URL for email verification links",
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}
]Update system configuration
| key required | string Configuration key |
| type | string Enum: "STRING" "INTEGER" "NUMBER" "BOOLEAN" "JSON" |
| value required | object |
| description | string |
{- "type": "STRING",
- "description": "string"
}{- "id": "config-uuid",
- "key": "email_verification_base_url",
- "type": "STRING",
- "description": "Base URL for email verification links",
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Get analytics data
| startDate | string |
| endDate | string |
| metric | string Enum: "users" "organizations" "logins" "signups" |
| granularity required | string Default: "day" Enum: "hour" "day" "week" "month" |
{- "metric": "users",
- "granularity": "day",
- "data": [
- {
- "date": "2024-01-01",
- "value": 150
}
], - "total": 1500
}{- "providers": [
- {
- "id": "1234567890",
- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true,
- "created_at": "2021-01-01T00:00:00.000Z",
- "updated_at": "2021-01-01T00:00:00.000Z"
}
], - "total": 1
}Create social provider
| provider required | string The provider to create |
| client_id required | string The client ID to create |
| client_secret required | string The client secret to create |
| redirect_uri | string The redirect URI to create |
| scopes | Array of strings The scopes to create |
| enabled | boolean Whether the provider is enabled |
{- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true
}{- "id": "1234567890",
- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true,
- "created_at": "2021-01-01T00:00:00.000Z",
- "updated_at": "2021-01-01T00:00:00.000Z"
}Get social provider by ID
| id required | string Social provider ID |
{- "id": "1234567890",
- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true,
- "created_at": "2021-01-01T00:00:00.000Z",
- "updated_at": "2021-01-01T00:00:00.000Z"
}Update social provider
| id required | string Social provider ID |
| provider | string The provider to create |
| client_id | string The client ID to create |
| client_secret | string The client secret to create |
| redirect_uri | string The redirect URI to create |
| scopes | Array of strings The scopes to create |
| enabled | boolean Whether the provider is enabled |
{- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true
}{- "id": "1234567890",
- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true,
- "created_at": "2021-01-01T00:00:00.000Z",
- "updated_at": "2021-01-01T00:00:00.000Z"
}Toggle social provider enabled status
| id required | string Social provider ID |
{- "id": "1234567890",
- "provider": "google",
- "client_id": "1234567890",
- "client_secret": "1234567890",
- "scopes": [
- "openid",
- "profile",
- "email"
], - "enabled": true,
- "created_at": "2021-01-01T00:00:00.000Z",
- "updated_at": "2021-01-01T00:00:00.000Z"
}Get all email templates with pagination and filtering
| search | string Search term for name, subject, or description |
| type | string Filter by template type |
| language | string Filter by language |
| limit | number Example: limit=20 Items per page |
| page | number Example: page=1 Page number |
{- "templates": [
- {
- "id": "template-uuid",
- "name": "verification",
- "type": "system",
- "subject": "Verify Your Email Address",
- "html_body": "<h1>Hello {{firstName}}</h1>",
- "text_body": "Hello {{firstName}}",
- "shipper_name": "PrimeForge Team",
- "shipper_email": "noreply@prime-forge.com",
- "response_email": "support@prime-forge.com",
- "language": "en",
- "variables": [
- "firstName",
- "lastName"
], - "description": "Email template for user verification",
- "is_active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}
], - "total": 10
}Create new email template
| name required | string |
| type required | string |
| subject required | string |
| html_body required | string |
| text_body | string |
| shipper_name | string |
| shipper_email | string |
| response_email | string |
| language required | string Default: "en" |
| variables | Array of strings |
| description | string |
| is_active required | boolean Default: true |
{- "name": "verification",
- "type": "system",
- "subject": "Verify Your Email Address",
- "html_body": "<h1>Hello {{firstName}}</h1>",
- "text_body": "string",
- "shipper_name": "string",
- "shipper_email": "string",
- "response_email": "string",
- "language": "en",
- "variables": [
- "string"
], - "description": "string",
- "is_active": true
}{- "id": "template-uuid",
- "name": "verification",
- "type": "system",
- "subject": "Verify Your Email Address",
- "html_body": "<h1>Hello {{firstName}}</h1>",
- "text_body": "Hello {{firstName}}",
- "shipper_name": "PrimeForge Team",
- "shipper_email": "noreply@prime-forge.com",
- "response_email": "support@prime-forge.com",
- "language": "en",
- "variables": [
- "firstName",
- "lastName"
], - "description": "Email template for user verification",
- "is_active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Get email template by ID
| id required | string |
{- "id": "template-uuid",
- "name": "verification",
- "type": "system",
- "subject": "Verify Your Email Address",
- "html_body": "<h1>Hello {{firstName}}</h1>",
- "text_body": "Hello {{firstName}}",
- "shipper_name": "PrimeForge Team",
- "shipper_email": "noreply@prime-forge.com",
- "response_email": "support@prime-forge.com",
- "language": "en",
- "variables": [
- "firstName",
- "lastName"
], - "description": "Email template for user verification",
- "is_active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Update email template
| id required | string |
| name | string |
| type | string |
| subject | string |
| html_body | string |
| text_body | string |
| shipper_name | string |
| shipper_email | string |
| response_email | string |
| language | string |
| variables | Array of strings |
| description | string |
| is_active | boolean |
{- "name": "string",
- "type": "string",
- "subject": "string",
- "html_body": "string",
- "text_body": "string",
- "shipper_name": "string",
- "shipper_email": "string",
- "response_email": "string",
- "language": "string",
- "variables": [
- "string"
], - "description": "string",
- "is_active": true
}{- "id": "template-uuid",
- "name": "verification",
- "type": "system",
- "subject": "Verify Your Email Address",
- "html_body": "<h1>Hello {{firstName}}</h1>",
- "text_body": "Hello {{firstName}}",
- "shipper_name": "PrimeForge Team",
- "shipper_email": "noreply@prime-forge.com",
- "response_email": "support@prime-forge.com",
- "language": "en",
- "variables": [
- "firstName",
- "lastName"
], - "description": "Email template for user verification",
- "is_active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Toggle email template active status
| id required | string |
{- "id": "template-uuid",
- "name": "verification",
- "type": "system",
- "subject": "Verify Your Email Address",
- "html_body": "<h1>Hello {{firstName}}</h1>",
- "text_body": "Hello {{firstName}}",
- "shipper_name": "PrimeForge Team",
- "shipper_email": "noreply@prime-forge.com",
- "response_email": "support@prime-forge.com",
- "language": "en",
- "variables": [
- "firstName",
- "lastName"
], - "description": "Email template for user verification",
- "is_active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Get all organization type plans with pagination and filtering
| orgType | string Enum: "SOLO" "BUSINESS" Filter by organization type |
| plan | string Enum: "SOLO_FREE" "SOLO_TRIAL" "SOLO_MONTHLY" "SOLO_ANNUAL" "TEAM_FREE" "TEAM_STARTER" "TEAM_GROWTH" "ENTERPRISE" Filter by plan |
| limit | number Example: limit=20 Items per page |
| page | number Example: page=1 Page number |
{- "data": [
- {
- "id": "uuid-string",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "can_create_business_org": false,
- "features": {
- "ai_features": true,
- "hr_basic": true
}, - "max_business_orgs_per_user": 1,
- "max_active_business_orgs_per_user": 1,
- "max_members": 100,
- "max_active_members": 5,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z",
- "created_by": "admin-uuid",
- "updated_by": "admin-uuid"
}
], - "pagination": {
- "page": 1,
- "limit": 20,
- "total": 100,
- "totalPages": 5
}
}Create new organization type plan
| org_type required | string Enum: "SOLO" "BUSINESS" Organization type |
| plan required | string Enum: "SOLO_FREE" "SOLO_TRIAL" "SOLO_MONTHLY" "SOLO_ANNUAL" "TEAM_FREE" "TEAM_STARTER" "TEAM_GROWTH" "ENTERPRISE" Organization plan |
| can_create_business_org required | boolean Default: false Whether can create business organization |
| features | object Features configuration JSON object |
| max_business_orgs_per_user required | number >= 0 Default: 1 Maximum business organizations per user |
| max_active_business_orgs_per_user required | number >= 0 Default: 1 Maximum active business organizations per user |
| max_members required | number >= 1 Default: 100 Maximum members |
| max_active_members required | number >= 1 Default: 5 Maximum active members |
{- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "can_create_business_org": false,
- "features": {
- "ai_features": true,
- "hr_basic": true
}, - "max_business_orgs_per_user": 1,
- "max_active_business_orgs_per_user": 1,
- "max_members": 100,
- "max_active_members": 5
}{- "id": "uuid-string",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "can_create_business_org": false,
- "features": {
- "ai_features": true,
- "hr_basic": true
}, - "max_business_orgs_per_user": 1,
- "max_active_business_orgs_per_user": 1,
- "max_members": 100,
- "max_active_members": 5,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z",
- "created_by": "admin-uuid",
- "updated_by": "admin-uuid"
}Get organization type plan by ID
| id required | string |
{- "id": "uuid-string",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "can_create_business_org": false,
- "features": {
- "ai_features": true,
- "hr_basic": true
}, - "max_business_orgs_per_user": 1,
- "max_active_business_orgs_per_user": 1,
- "max_members": 100,
- "max_active_members": 5,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z",
- "created_by": "admin-uuid",
- "updated_by": "admin-uuid"
}Update organization type plan
| id required | string |
| org_type | string Enum: "SOLO" "BUSINESS" Organization type |
| plan | string Enum: "SOLO_FREE" "SOLO_TRIAL" "SOLO_MONTHLY" "SOLO_ANNUAL" "TEAM_FREE" "TEAM_STARTER" "TEAM_GROWTH" "ENTERPRISE" Organization plan |
| can_create_business_org | boolean Default: false Whether can create business organization |
| features | object Features configuration JSON object |
| max_business_orgs_per_user | number >= 0 Default: 1 Maximum business organizations per user |
| max_active_business_orgs_per_user | number >= 0 Default: 1 Maximum active business organizations per user |
| max_members | number >= 1 Default: 100 Maximum members |
| max_active_members | number >= 1 Default: 5 Maximum active members |
{- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "can_create_business_org": false,
- "features": {
- "ai_features": true,
- "hr_basic": true
}, - "max_business_orgs_per_user": 1,
- "max_active_business_orgs_per_user": 1,
- "max_members": 100,
- "max_active_members": 5
}{- "id": "uuid-string",
- "org_type": "SOLO",
- "plan": "SOLO_TRIAL",
- "can_create_business_org": false,
- "features": {
- "ai_features": true,
- "hr_basic": true
}, - "max_business_orgs_per_user": 1,
- "max_active_business_orgs_per_user": 1,
- "max_members": 100,
- "max_active_members": 5,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z",
- "created_by": "admin-uuid",
- "updated_by": "admin-uuid"
}Create a new app role matrix for application-specific roles
| name required | string Application name |
| description | string Application description |
| roles required | Array of arrays Available roles for this application |
| active | boolean Default: true Whether the app role matrix is active |
{- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true
}{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Get all app role matrices with pagination
| activeOnly | boolean Example: activeOnly=false Only return active app role matrices |
| limit | number Example: limit=20 Items per page |
| page | number Example: page=1 Page number |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}
], - "pagination": {
- "page": 1,
- "limit": 20,
- "total": 100,
- "totalPages": 5
}
}Get a single app role matrix by its ID
| id required | string App role matrix ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Update an existing app role matrix
| id required | string App role matrix ID |
| name | string Application name |
| description | string Application description |
| roles | Array of arrays Available roles for this application |
| active | boolean Whether the app role matrix is active |
{- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true
}{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Get a single app role matrix by its name
| name required | string App role matrix name |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Toggle the active status of an app role matrix
| id required | string App role matrix ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "name": "HR",
- "description": "Human Resources Management",
- "roles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
], - "active": true,
- "created_at": "2024-01-01T00:00:00Z",
- "updated_at": "2024-01-01T00:00:00Z"
}Returns all active app role matrices that can be assigned to organization members.
| page | number Example: page=1 Page number |
| limit | number Example: limit=20 Items per page |
{- "data": [
- {
- "app": "HR",
- "description": "Human Resources Management",
- "availableRoles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
]
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 10,
- "totalItems": 100,
- "total_pages": 10,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}Returns available roles that can be assigned for a specific application.
| appName required | string Application name (e.g., HR, CRM) |
{- "app": "HR",
- "description": "Human Resources Management",
- "availableRoles": [
- "HR_MANAGER",
- "HR_SPECIALIST",
- "HR_ESS",
- "HR_PAYROLL"
]
}| page required | number |
| limit required | number |
[- {
- "id": "string",
- "tenant_id": "string",
- "resource": "string",
- "action": "string",
- "conditions": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]| resource required | string Resource type the policy applies to |
| action required | string Action the policy governs |
| conditions required | object Policy conditions as JSON object |
{- "resource": "organization",
- "action": "read",
- "conditions": {
- "role": "ADMIN",
- "userAttributes": {
- "department": "IT"
}, - "resourceAttributes": {
- "status": "active"
}
}
}{- "id": "string",
- "tenant_id": "string",
- "resource": "string",
- "action": "string",
- "conditions": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string Policy rule ID |
| resource | string Resource type the policy applies to |
| action | string Action the policy governs |
| conditions | object Policy conditions as JSON object |
{- "resource": "organization",
- "action": "read",
- "conditions": {
- "role": "ADMIN",
- "userAttributes": {
- "department": "IT"
}, - "resourceAttributes": {
- "status": "active"
}
}
}{- "id": "string",
- "tenant_id": "string",
- "resource": "string",
- "action": "string",
- "conditions": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| resource required | string Resource to check access for |
| action required | string Action to check |
| context | object Additional context for policy evaluation |
{- "resource": "organization",
- "action": "read",
- "context": {
- "resourceAttributes": {
- "status": "active"
}, - "environment": "production"
}
}{- "allowed": true,
- "reason": "string",
- "details": { }
}required | Array of objects (EvaluatePolicyDto) Array of permission checks to evaluate | ||||||
Array
| |||||||
{- "checks": [
- {
- "resource": "organization",
- "action": "read",
- "context": {
- "resourceAttributes": {
- "status": "active"
}, - "environment": "production"
}
}
]
}{- "results": {
- "organization:read": true,
- "members:invite": false
}
}