> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Alerts

> Get alerts for entities or organizations with filtering and pagination — using the gu1 alerts API for risk and compliance workflows.

## Overview

Retrieves alerts for specific entities or across the organization. Alerts are generated automatically by rules when conditions are met.

## Endpoint

```
GET http://api.gu1.ai/intelligence/alerts
```

## Authentication

Requires a valid API key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Query Parameters

<ParamField query="entityId" type="string" required>
  Entity ID to filter alerts (person, company, or transaction)
</ParamField>

<ParamField query="status" type="string">
  Filter by status: `PENDING`, `ACKNOWLEDGED`, `RESOLVED`
</ParamField>

<ParamField query="severity" type="string">
  Filter by severity: `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`
</ParamField>

<ParamField query="category" type="string">
  Filter by alert category
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="alerts" type="array">
  Array of alert objects
</ResponseField>

<ResponseField name="count" type="number">
  Total number of alerts matching filters
</ResponseField>

## Example Requests

### Get Alerts for Entity

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "http://api.gu1.ai/intelligence/alerts?entityId=550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'http://api.gu1.ai/intelligence/alerts?entityId=550e8400-e29b-41d4-a716-446655440000',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  console.log(`Found ${data.count} alerts`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'http://api.gu1.ai/intelligence/alerts',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY'
      },
      params={
          'entityId': '550e8400-e29b-41d4-a716-446655440000'
      }
  )

  data = response.json()
  print(f"Found {data['count']} alerts")
  ```
</CodeGroup>

### Filter by Severity and Status

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "http://api.gu1.ai/intelligence/alerts?entityId=550e8400-e29b-41d4-a716-446655440000&severity=CRITICAL&status=PENDING" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'http://api.gu1.ai/intelligence/alerts?' + new URLSearchParams({
      entityId: '550e8400-e29b-41d4-a716-446655440000',
      severity: 'CRITICAL',
      status: 'PENDING'
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  console.log(`Critical pending alerts: ${data.count}`);
  ```

  ```python Python theme={null}
  response = requests.get(
      'http://api.gu1.ai/intelligence/alerts',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY'
      },
      params={
          'entityId': '550e8400-e29b-41d4-a716-446655440000',
          'severity': 'CRITICAL',
          'status': 'PENDING'
      }
  )

  data = response.json()
  print(f"Critical pending alerts: {data['count']}")
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "success": true,
  "alerts": [
    {
      "id": "alert-uuid-123",
      "name": "High Risk Transaction Pattern",
      "category": "transaction_monitoring",
      "severity": "CRITICAL",
      "status": "PENDING",
      "createdAt": "2024-12-23T10:00:00.000Z",
      "updatedAt": "2024-12-23T10:00:00.000Z",
      "riskContribution": 25,
      "miniAnalysis": "Multiple high-value transactions detected within short timeframe",
      "investigationId": null,
      "targetEntityId": "550e8400-e29b-41d4-a716-446655440000",
      "triggerCondition": {
        "ruleName": "Rapid Transaction Detection",
        "threshold": 5,
        "actual": 8
      },
      "sourceSystem": "rules_engine"
    }
  ],
  "count": 1
}
```

## Alert Severity Levels

* **LOW**: Informational, requires review
* **MEDIUM**: Moderate risk, should be investigated
* **HIGH**: Significant risk, requires immediate attention
* **CRITICAL**: Severe risk, urgent action required

## Alert Status Workflow

1. **PENDING**: Alert just created, awaiting review
2. **ACKNOWLEDGED**: Alert has been reviewed by compliance team
3. **RESOLVED**: Alert has been addressed and closed

## See Also

* [Acknowledge Alert](/en/api-reference/alerts/acknowledge)
* [Resolve Alert](/en/api-reference/alerts/resolve)
* [Get Intelligence Inbox](/en/api-reference/alerts/inbox)
* [Create Rule](/en/api-reference/rules/create)
