Accounts Endpoints
The Accounts API provides endpoints for managing user accounts, retrieving account details, and performing bulk operations.
Base URL
All endpoints are relative to /api/v1/accounts.
List Accounts
Retrieve a paginated list of accounts with optional filtering.
GET /api/v1/accountsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
search | string | Search by account name or email |
department | string | Filter by department |
data_source_id | string | Filter by data source |
limit | number | Number of items to return (default: 50) |
after | string | Cursor for pagination |
Response
{
"accounts": [
{
"id": "acc-123",
"name": "john.doe",
"email": "john.doe@company.com",
"display_name": "John Doe",
"department": "Engineering",
"status": "active",
"risk_score": 35,
"created_at": "2024-01-15T10:30:00Z"
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "cursor-token"
}
}Get Account
Retrieve details for a specific account.
GET /api/v1/accounts/{id}Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Response
Returns the complete account object with all fields.
Create Account
Create a new account record.
POST /api/v1/accounts::: note Administrator Only This endpoint requires Administrator role. :::
Request Body
{
"name": "jane.smith",
"email": "jane.smith@company.com",
"display_name": "Jane Smith",
"department": "Finance",
"data_source_id": "ds-123"
}Response
Returns the created account object with generated id.
Update Account
Update an existing account.
PUT /api/v1/accounts/{id}::: note Administrator Only This endpoint requires Administrator role. :::
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Request Body
Include only the fields to update.
Response
Returns the updated account object.
Delete Account
Delete an account record.
DELETE /api/v1/accounts/{id}::: note Administrator Only This endpoint requires Administrator role. :::
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Response
Returns 204 No Content on success.
Bulk Get Accounts
Retrieve multiple accounts by their IDs in a single request.
POST /api/v1/accounts/bulkRequest Body
{
"account_ids": ["acc-123", "acc-456", "acc-789"]
}Response
{
"accounts": [...],
"not_found": ["acc-789"]
}Get Account Attributes
Retrieve custom attributes for an account.
GET /api/v1/accounts/{id}/attributesPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Response
{
"attributes": {
"custom_field_1": "value",
"custom_field_2": "value"
},
"count": 2
}Get Account Group Memberships
Retrieve groups an account belongs to.
GET /api/v1/accounts/{id}/groupmembershipsPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Response
{
"groups": [
{
"id": "grp-123",
"name": "Engineering Team",
"membership_type": "direct"
}
],
"count": 1
}Get Account Owners
Retrieve owners associated with an account.
GET /api/v1/accounts/{id}/ownersPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Response
{
"owners": [
{
"id": "own-123",
"name": "John Manager",
"email": "john.manager@company.com"
}
],
"count": 1
}Search by Attributes
Search accounts by custom attribute values.
GET /api/v1/accounts/search/attributesQuery Parameters
| Parameter | Type | Description |
|---|---|---|
field_name | string | Attribute field name |
field_value | string | Value to search for |
limit | number | Number of results |
Response
Paginated list of matching accounts.
Get Attribute Search Stats
Get statistics about searchable attributes.
GET /api/v1/accounts/search/attributes/statsResponse
{
"searchable_fields": 15,
"total_indexed_values": 5000
}Get Account Platforms
Get distinct platforms with account counts.
GET /api/v1/accounts/platformsResponse
{
"platforms": [
{ "name": "Okta", "count": 1500 },
{ "name": "Azure", "count": 800 }
]
}Calculate Account Risk
Trigger risk score calculation for an account.
POST /api/v1/accounts/{id}/calculate-riskPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Account ID |
Response
{
"status": "calculating",
"message": "Risk calculation started"
}Manager Resolution Endpoints
Get Manager Resolution Config
GET /api/v1/accounts/manager-resolution/configSave Manager Resolution Config
PUT /api/v1/accounts/manager-resolution/config::: note Administrator Only This endpoint requires Administrator role. :::
Request Body
{
"source_application": "app-123",
"manager_field_path": "entity.ManagerID",
"manager_id_field_path": "entity.EmployeeNumber",
"scheduled_enabled": true
}Run Manager Resolution
POST /api/v1/accounts/manager-resolution/run::: note Administrator Only This endpoint requires Administrator role. :::
Get Manager Resolution Stats
GET /api/v1/accounts/manager-resolution/statsResponse
{
"total_owners": 1000,
"owners_with_manager": 850,
"owners_without_manager": 150
}Error Responses
| Status Code | Description |
|---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Authentication required |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Account does not exist |
500 | Internal Server Error |
Related Topics
- Owners API - Owner management endpoints
- Groups API - Group management endpoints
- API Reference - Complete API index
