---
title: "Usage Alerts"
description: "Configure usage alerts for your Email Gateway account."
canonical: "https://docs.cm.com/email-gateway-api/guides/usage-alerts"
---

# Usage Alerts

> Configure usage alerts for your Email Gateway account.

Source: https://docs.cm.com/email-gateway-api/guides/usage-alerts

Manage alerts to monitor your accounts usage.

The Email Alerts API enables you to configure and manage usage alerts for your account. You can create up to 8 alerts per account to monitor your accounts usage and receive notifications when thresholds are reached.

:::info
This feature is currently unavailable to pay-as-you-go users.
:::

## List Alerts

Retrieve all alerts configured for a logical account.

#### Request Header

```http
GET https://api.cm.com/email/alerts/v1/account/{logicalAccount}/alerts/list
```

### Response Body

**Successful Response (200)**

```json
{
    "success": true,
    "status": 200,
    "message": "Alerts found.",
    "data": [
        {
            "id": 5,
            "logicalAccountId": "50025f6a-d4fd-4a23-9e2e-bbee1cf67d2b",
            "alertName": "alert 2",
            "metric": "Usage",
            "threshold": "<80",
            "recipient": "wemixe7699@amcret.com",
            "createdDate": "2025-08-25T05:14:02.069378",
            "updatedDate": "2025-08-25T05:14:02.069378"
        },
        {
            "id": 4,
            "logicalAccountId": "50025f6a-d4fd-4a23-9e2e-bbee1cf67d2b",
            "alertName": "alert 1",
            "metric": "Usage",
            "threshold": ">90",
            "recipient": "testok@xyz.com",
            "createdDate": "2025-08-25T05:13:26.014882",
            "updatedDate": "2025-08-25T05:13:26.014882"
        }
    ]
}
```

## Add Alert

Create a new alert for monitoring email metrics.

### Request Header

```http
POST https://api.cm.com/email/alerts/v1/account/{logicalAccount}/alerts/create
Content-Type: application/json

{
    "alertName": "Low Open Rate Alert",
    "metric": "Usage",
    "threshold": "<50",
    "recipient": "admin@company.com, manager@company.com"
}
```

### Response Body

**Successful Response (200)**

```json
{
    "success": true,
    "status": 200,
    "message": "Successfully inserted new email alert.",
    "data": 8
}
```

### Error Responses

**Maximum Limit (400)**

```json
{
    "success": true,
    "status": 200,
    "message": "Maximum alert limit reached, cannot add more alerts.",
    "data": null
}
```

**Pay as you go Error (400)**

```json
{
    "success": false,
    "status": 400,
    "message": "Email alerts are not available for Pay-As-You-Go bundle type.",
    "data": null
}
```

## Update Existing Alert

Update an existing alert configuration.

### Request Header

```http
PUT https://api.cm.com/email/alerts/v1/account/{logicalAccount}/alerts/update/{id}
Content-Type: application/json

{
    "alertName": "Updated Usage Rate Alert",
    "metric": "Usage",
    "threshold": ">85",
    "recipient": "admin@company.com, support@company.com"
}
```

### Response Body

**Successful Response (200)**

```json
{
    "success": true,
    "status": 200,
    "message": "Updated email alert",
    "data": 13
}
```

## Delete Alert

Delete an existing alert.

### Request Header

```http
DELETE https://api.cm.com/email/alerts/v1/account/{logicalAccount}/alerts/delete/{id}
```

### Response Body

**Successful Response (200)**

```json
{
    "success": true,
    "status": 200,
    "message": "Successfully deleted email alert with id 14",
    "data": 1
}
```

### Error Responses

**Alert Not Found (400)**

```json
{
    "success": false,
    "status": 400,
    "message": "Alert not found or already deleted.",
    "data": -1
}
```

**Internal Error (500)**

```json
{
  "status": 500,
  "message": "An unexpected internal server error occurred.",
  "success": false,
	"data": null
}
```

## Request Parameters

### Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| Logical Account | GUID | Yes | Unique identifier for the logical account |
| id | int32 | Yes | Alert ID (for update/delete operations only) |

### Request Body Fields

| Field | Type | Required | Description |
| - | - | - | - |
| Alert Name | string | Yes | Name of the alert |
| metric | string | Yes | Usage |
| threshold | string | Yes | Threshold with operator (e.g., ">90", "\<50", "=75") |
| recipient | string | Yes | Email addresses (comma-separated for multiple) |

## Threshold Operators

| Operator | Symbol | Description |
| - | - | - |
| Over | > | Alert when metric is above threshold |
| Below | \< | Alert when metric is below threshold |
| Equal | = | Alert when metric equals threshold |

## Best Practices

1. **Alert Limit**: Remember the 8-alert limit per account. Plan your alerts strategically.
2. **Threshold Values**: Use percentage values (0-100) for thresholds.
3. **Multiple Recipients**: Use comma-separated email addresses for multiple notifications. You can add max 5 recipients per alert.
4. **Meaningful Names**: Use descriptive alert names for easy identification.
5. **Monitor Performance**: Regularly review and update alert thresholds based on your email performance trends.

## Examples

### High Usage Alert

Monitor when usage rate exceed expectations:

```json
{
    "alertName": "Excellent Campaign Performance",
    "metric": "Usage",
    "threshold": ">95",
    "recipient": "marketing@example.com"
}
```

### Deliverability Issue Alert

Monitor for delivery problems:

```json
{
    "alertName": "Low Usage Rate Warning",
    "metric": "Usage",
    "threshold": ">10",
    "recipient": "admin@example.com, operations@example.com"
}
```
