Accounts
The Accounts API lets you list and retrieve your connected AWS accounts. These are accounts that have been connected through the Fegura dashboard with the required IAM role.
GET
/api/accountsreadList all connected AWS accounts
GET
/api/accounts/{id}readRetrieve a specific AWS account
List Accounts
GET
/api/accountsreadReturns a paginated list of all connected AWS accounts for your organization.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of accounts to return per page (1-100)Default: 20 |
cursor | string | Pagination cursor from previous response |
Example Request
curl "https://api.fegura.ai/api/accounts?limit=10" \
-H "Authorization: Bearer feg_live_your_api_key" \
-H "Fegura-Version: 2026-02-01"Response
{
"success": true,
"data": {
"accounts": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"alias": "Production",
"awsAccountId": "123456789012",
"status": "connected",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"alias": "Staging",
"awsAccountId": "987654321098",
"status": "connected",
"createdAt": "2026-01-10T08:00:00.000Z",
"updatedAt": "2026-01-10T08:00:00.000Z"
}
],
"meta": {
"cursor": "eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9",
"hasMore": true
}
}
}Response Fields
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the account connection (UUID) |
alias | string | User-defined name for the account |
awsAccountId | string | 12-digit AWS account ID |
status | string | Connection status: "connected", "pending", or "failed" |
createdAt | string | ISO 8601 timestamp of when the account was connected |
updatedAt | string | ISO 8601 timestamp of the last update |
Get Account
GET
/api/accounts/{id}readRetrieves detailed information about a specific connected AWS account.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | string | The account connection ID (UUID) |
Example Request
curl "https://api.fegura.ai/api/accounts/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer feg_live_your_api_key" \
-H "Fegura-Version: 2026-02-01"Response
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"alias": "Production",
"awsAccountId": "123456789012",
"roleArn": "arn:aws:iam::123456789012:role/FeguraRole-abc123",
"externalId": "abc123-def456-ghi789",
"status": "connected",
"errorMessage": null,
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
}Additional Response Fields
| Parameter | Type | Description |
|---|---|---|
roleArn | string | ARN of the IAM role used for cross-account access |
externalId | string | External ID used for STS assume role |
errorMessage | string | null | Error details if status is "failed" |
Account Statuses
| Status | Description |
|---|---|
| connected | Account is fully connected and ready for scanning |
| pending | IAM role setup is in progress or awaiting verification |
| failed | Connection failed; check errorMessage for details |