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_member_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",
      "config": {
        "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx",
        "channel": "#incidents"
      },
      "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_member_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_01HXYZ...",
    "channel": "slack",
    "condition_type": "new_incident",
    "severity_min": "high",
    "config": {
      "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx",
      "channel": "#incidents"
    },
    "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.
configobjectYesChannel-specific configuration.
is_enabledbooleanNoDefault: true.

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:

{ "recipient_email": "oncall@mycompany.com" }

Slack:

{
  "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx",
  "channel": "#incidents"
}

Discord:

{ "webhook_url": "https://discord.com/api/webhooks/..." }

Webhook:

{ "url": "https://myapp.com/alerts", "secret": "optional-signing-secret" }

Response (201):

{
  "alert": {
    "alert_id": "alt_01HDEF...",
    "project_id": "proj_01HXYZ...",
    "channel": "slack",
    "condition_type": "new_incident",
    "severity_min": "high",
    "config": { "webhook_url": "https://hooks.slack.com/...", "channel": "#incidents" },
    "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_member_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.

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_member_a1b2c3d4..."

Response (204): No content.

Next Steps

On this page