Manage account creation, user management, and account-level operations.
/api/accounts
The Accounts API provides endpoints for managing accounts, users within accounts, and account settings. Supports user invitations, role management, and account profile management.
Allows new user to signup and create a new account.
{
"email": "user@example.com",
"password": "secure_password_123",
"firstName": "John",
"lastName": "Doe",
"accountName": "Acme Corporation",
"country": "US"
}
{
"id": 1,
"email": "user@example.com",
"accountId": 10,
"accountName": "Acme Corporation",
"createdAt": "2026-06-02T10:30:00Z"
}
Creates a new account (authenticated users).
{
"name": "Enterprise Account",
"description": "Main enterprise account",
"primaryContact": "contact@enterprise.com"
}
{
"id": 2,
"name": "Enterprise Account",
"createdAt": "2026-06-02T10:30:00Z"
}
Gets all accounts with filters and pagination.
| Parameter | Type | Description |
|---|---|---|
| $filter | string | OData filter (e.g., name eq 'Acme') |
| $orderby | string | Sort order (e.g., createdAt desc) |
| $skip | integer | Number of records to skip |
| $top | integer | Number of records to return |
{
"value": [
{
"id": 1,
"name": "Acme Corporation",
"createdAt": "2026-06-02T10:30:00Z"
}
],
"count": 1
}
Gets account details by ID.
| Parameter | Type | Description |
|---|---|---|
| id | integer | Account ID |
{
"id": 1,
"name": "Acme Corporation",
"description": "Main account",
"status": "active",
"createdAt": "2026-06-02T10:30:00Z"
}
Gets account details by name.
| Parameter | Type | Description |
|---|---|---|
| name | string | Account name |
{
"id": 1,
"name": "Acme Corporation",
"description": "Main account",
"createdAt": "2026-06-02T10:30:00Z"
}
Updates account details.
| Parameter | Type |
|---|---|
| id | integer |
{
"name": "Updated Account Name",
"description": "Updated description",
"status": "active"
}
{
"id": 1,
"name": "Updated Account Name",
"updatedAt": "2026-06-02T11:00:00Z"
}
Adds new user to account with specified roles.
{
"email": "newuser@example.com",
"firstName": "Jane",
"lastName": "Smith",
"roles": ["user", "viewer"]
}
{
"id": 100,
"email": "newuser@example.com",
"accountId": 1,
"roles": ["user", "viewer"],
"createdAt": "2026-06-02T10:30:00Z"
}
Adds existing user (by ID) to account.
{
"roles": ["user", "admin"]
}
{
"success": true,
"message": "User added to account"
}
Updates account user roles.
{
"roles": ["admin", "user"],
"status": "active"
}
{
"success": true,
"message": "User roles updated"
}
Re-sends email invitation to user.
{
"success": true,
"message": "Invitation email resent"
}
Removes user from account.
{
"success": true,
"message": "User removed from account"
}
Deletes account (account owner required).
{
"success": true,
"message": "Account deleted"
}
| Code | HTTP Status | Description |
|---|---|---|
| ACCOUNT_NOT_FOUND | 404 | Account does not exist |
| ACCOUNT_ALREADY_EXISTS | 409 | Account name already exists |
| UNAUTHORIZED | 403 | User does not have required role |
| USER_ALREADY_IN_ACCOUNT | 409 | User already belongs to account |