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.

ℹ️

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

List Alerts

Retrieve all alerts configured for a logical account.

Request Header

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

Response Body

Successful Response (200)

{
    "success": true,
    "status": 200,
    "message": "Alerts found.",
    "data": [
        {
            "id": 5,
            "logicalAccountId": "903e1cef-84b3-4500-a9a5-b2ca219f76f5",
            "alertName": "alert 2",
            "metric": "Usage",
            "threshold": "<80",
            "recipient": "[email protected]",
            "createdDate": "2025-08-25T05:14:02.069378",
            "updatedDate": "2025-08-25T05:14:02.069378"
        },
        {
            "id": 4,
            "logicalAccountId": "903e1cef-84b3-4500-a9a5-b2ca219f76f5",
            "alertName": "alert 1",
            "metric": "Usage",
            "threshold": ">90",
            "recipient": "[email protected]",
            "createdDate": "2025-08-25T05:13:26.014882",
            "updatedDate": "2025-08-25T05:13:26.014882"
        }
    ]
}
success: true
status: 200
message: "Alerts found."
data:
  - id: 5
    logicalAccountId: "903e1cef-84b3-4500-a9a5-b2ca219f76f5"
    alertName: "alert 2"
    metric: "Usage"
    threshold: "<80"
    recipient: "[email protected]"
    createdDate: "2025-08-25T05:14:02.069378"
    updatedDate: "2025-08-25T05:14:02.069378"
  - id: 4
    logicalAccountId: "903e1cef-84b3-4500-a9a5-b2ca219f76f5"
    alertName: "alert 1"
    metric: "Usage"
    threshold: ">90"
    recipient: "[email protected]"
    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

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": "[email protected], [email protected]"
}

Response Body

Successful Response (200)

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

Error Responses

Maximum Limit (400)

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

Pay as you go Error (400)

{
    "success": false,
    "status": 400,
    "message": "Email alerts are not available for Pay-As-You-Go bundle type.",
    "data": null
}
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 and Request Body

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": "[email protected], [email protected]"
}

Response Body

Successful Response (200)

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

Delete Alert

Delete an existing alert.

Request Header

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

Response Body

Successful Response (200)

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

Error Responses

Alert Not Found (400)

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

Internal Error (500)

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

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
Logical AccountGUIDYesUnique identifier for the logical account
idint32YesAlert ID (for update/delete operations only)

Request Body Fields

FieldTypeRequiredDescription
Alert NamestringYesName of the alert
metricstringYesUsage
thresholdstringYesThreshold with operator (e.g., ">90", "<50", "=75")
recipientstringYesEmail addresses (comma-separated for multiple)

Threshold Operators

OperatorSymbolDescription
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:

{
    "alertName": "Excellent Campaign Performance",
    "metric": "Usage",
    "threshold": ">95",
    "recipient": "[email protected]"
}
alertName: "Excellent Campaign Performance"
metric: "Usage"
threshold: ">95"
recipient: "[email protected]"

Deliverability Issue Alert

Monitor for delivery problems:

{
    "alertName": "Low Usage Rate Warning",
    "metric": "Usage",
    "threshold": ">10",
    "recipient": "[email protected], [email protected]"
}
alertName: "Low Usage Rate Warning"
metric: "Usage"
threshold: ">10"
recipient: "[email protected], [email protected]"

Did this page help you?