DebugBundle
API

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:

ParameterTypeDefaultDescription
project_idstringRequired. Project UUID.
limitnumber50Max 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/alerts
curl -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:

FieldTypeRequiredDescription
project_idstringYesProject UUID.
channelstringYesAlert channel: email, slack, discord, webhook.
condition_typestringYesTrigger condition (see below).
service_idstringNoScope to a specific service.
severity_minstringNoMinimum severity: low, medium, high, critical.
cooldown_secondsnumberNoNotification cooldown in seconds. Defaults to 0, accepts 0 to disable suppression, max 604800 (7 days).
configobjectYesChannel-specific configuration. Email alerts require a single to recipient email.
is_enabledbooleanNoDefault: 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

ConditionTrigger
new_incidentA new incident is created.
incident_regressedA previously resolved incident regressed.
error_spikeAn unusual spike in error occurrences.
severity_thresholdAn incident's severity exceeds severity_min.
regression_after_deployA 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}/alerts

Returns { "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/destinations

Returns connected Slack workspace/channel records for the project's organization. Webhook URLs are never returned.

Test Destination

POST /v1/projects/{projectId}/slack/destinations/{destinationId}/test

Sends 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

On this page