Alerts API
Create, update, and delete alert rules via the DebugBundle REST API.
All alert endpoints require member token authentication via the Authorization header.
List Alerts
GET /v1/alerts?project_id={projectId}curl https://api.debugbundle.com/v1/alerts?project_id=proj_01HXYZ... \
-H "Authorization: Bearer dbundle_mem_a1b2c3d4..."Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
project_id | string | — | Required. Project UUID. |
limit | number | 50 | Max results (1–100). |
Response (200):
{
"alerts": [
{
"alert_id": "alt_01HABC...",
"project_id": "proj_01HXYZ...",
"channel": "slack",
"condition_type": "new_incident",
"service_id": null,
"severity_min": "high",
"cooldown_seconds": 86400,
"config": {
"slack_destination_id": "11111111-1111-4111-8111-111111111111"
},
"is_enabled": true,
"created_at": "2026-03-20T10:00:00Z",
"updated_at": "2026-03-20T10:00:00Z"
}
]
}Create Alert
POST /v1/alertscurl -X POST https://api.debugbundle.com/v1/alerts \
-H "Authorization: Bearer dbundle_mem_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"project_id": "proj_01HXYZ...",
"channel": "slack",
"condition_type": "new_incident",
"severity_min": "high",
"cooldown_seconds": 86400,
"config": {
"slack_destination_id": "11111111-1111-4111-8111-111111111111"
},
"is_enabled": true
}'Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID. |
channel | string | Yes | Alert channel: email, slack, discord, webhook. |
condition_type | string | Yes | Trigger condition (see below). |
service_id | string | No | Scope to a specific service. |
severity_min | string | No | Minimum severity: low, medium, high, critical. |
cooldown_seconds | number | No | Notification cooldown in seconds. Defaults to 0, accepts 0 to disable suppression, max 604800 (7 days). |
config | object | Yes | Channel-specific configuration. Email alerts require a single to recipient email. |
is_enabled | boolean | No | Default: true. |
Severity filters run after worker severity inference. Opaque browser-native window_error
incidents infer low, and opaque resource_error incidents infer medium; they do
not satisfy severity_min: "high" unless explicitly escalated later.
Condition Types
| Condition | Trigger |
|---|---|
new_incident | A new incident is created. |
incident_regressed | A previously resolved incident regressed. |
error_spike | An unusual spike in error occurrences. |
severity_threshold | An incident's severity exceeds severity_min. |
regression_after_deploy | A regression detected after a deployment. |
Channel Configuration
Email:
{ "to": "oncall@mycompany.com" }Slack:
Connected Slack destination:
{
"slack_destination_id": "11111111-1111-4111-8111-111111111111"
}Direct webhook for callers that intentionally manage Slack webhook URLs:
{
"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"
}Discord:
{ "webhook_url": "https://discord.com/api/webhooks/..." }Webhook:
{ "target_url": "https://myapp.com/alerts" }Response (201):
{
"alert": {
"alert_id": "alt_01HDEF...",
"project_id": "proj_01HXYZ...",
"channel": "slack",
"condition_type": "new_incident",
"severity_min": "high",
"cooldown_seconds": 86400,
"config": { "slack_destination_id": "11111111-1111-4111-8111-111111111111" },
"is_enabled": true,
"created_at": "2026-03-24T10:30:00Z"
}
}Update Alert
PATCH /v1/alerts/{id}curl -X PATCH https://api.debugbundle.com/v1/alerts/alt_01HDEF... \
-H "Authorization: Bearer dbundle_mem_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"severity_min": "critical",
"is_enabled": true
}'Partial update — only the specified fields are changed. Set a field to null to clear it.
When updating channel-specific config, include the channel in the same request.
Set cooldown_seconds to 0 to disable repeated-notification suppression, or a positive value up to 604800 seconds to suppress repeated notifications for the same notification key without changing incident grouping.
Response (200): Updated alert object.
Delete Alert
DELETE /v1/alerts/{id}curl -X DELETE https://api.debugbundle.com/v1/alerts/alt_01HDEF... \
-H "Authorization: Bearer dbundle_mem_a1b2c3d4..."Response (204): No content.
Slack Connected Destinations
Team-tier projects can use reusable Slack destinations instead of storing raw webhook URLs in alert rules.
Get Slack Install URL
GET /v1/slack/app/install-url?project_id={projectId}&return_to=/projects/{projectId}/alertsReturns { "install_url": "https://slack.com/oauth/v2/authorize?..." }. Open that URL in a browser to let Slack show the workspace/channel picker.
List Destinations
GET /v1/projects/{projectId}/slack/destinationsReturns connected Slack workspace/channel records for the project's organization. Webhook URLs are never returned.
Test Destination
POST /v1/projects/{projectId}/slack/destinations/{destinationId}/testSends a test message to the selected Slack channel and returns { "delivered": true }.
Delete Destination
DELETE /v1/projects/{projectId}/slack/destinations/{destinationId}Deletes the destination when no alert rule or weekly report still references it. This cleanup action remains available after downgrade. If it is still in use, the API returns 409 slack_destination_in_use.
Next Steps
- Alerts — Alert system concepts and architecture
- CLI Alert Management — Manage alerts via CLI
- Webhooks API — Webhook endpoint management