DebugBundle
API

Projects API

Create, list, update, and delete projects via the DebugBundle REST API.

All project endpoints require member token authentication via the Authorization header.

All project operations are also available via the CLI (debugbundle project list/create/update/delete) and MCP tools (list_projects, create_project, update_project, delete_project). See CLI Cloud Workflow and MCP Tools.

List Projects

GET /v1/projects
curl https://api.debugbundle.com/v1/projects \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..."

Response (200):

{
  "projects": [
    {
      "project_id": "proj_01HXYZ...",
      "organization_id": "org_01HABCDE...",
      "name": "Backend API",
      "slug": "backend-api",
      "environment_default": "production",
      "organization_plan": "team",
      "created_at": "2026-01-10T08:00:00Z",
      "updated_at": "2026-03-15T14:30:00Z"
    }
  ]
}

Create Project

POST /v1/projects
curl -X POST https://api.debugbundle.com/v1/projects \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Backend API",
    "slug": "backend-api",
    "environment_default": "production"
  }'

Request Body:

FieldTypeRequiredDescription
namestringYesHuman-readable project name.
slugstringYesURL-safe identifier (lowercase, hyphens, no spaces).
environment_defaultstringNoEditable project default used in setup snippets and prefilled project metadata. Common values: production, staging, development, but custom values are allowed.

Response (201):

{
  "project": {
    "project_id": "proj_01HNEW...",
    "organization_id": "org_01HABCDE...",
    "name": "Backend API",
    "slug": "backend-api",
    "environment_default": "production",
    "organization_plan": "team",
    "created_at": "2026-03-24T11:00:00Z"
  }
}

Get Project

GET /v1/projects/{id}
curl https://api.debugbundle.com/v1/projects/proj_01HXYZ... \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..."

Response (200): Single project object.

Update Project

PATCH /v1/projects/{id}
curl -X PATCH https://api.debugbundle.com/v1/projects/proj_01HXYZ... \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Backend API v2",
    "environment_default": "staging"
  }'

Partial update — only the specified fields are changed.

Response (200): Updated project object.

Delete Project

DELETE /v1/projects/{id}
curl -X DELETE https://api.debugbundle.com/v1/projects/proj_01HXYZ... \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..."

Response (204): No content.

Deleting a project permanently removes all incidents, bundles, tokens, webhooks, and alerts associated with that project. This operation cannot be undone.

Capture Policy

Each project has a capture policy that controls event ingestion behavior.

Get Capture Policy

GET /v1/projects/{id}/capture-policy
curl https://api.debugbundle.com/v1/projects/proj_01HXYZ.../capture-policy \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..."

Response (200):

{
  "policy": {
    "preset": "balanced",
    "capture_logs": "warning",
    "capture_request_events": "failures_only",
    "capture_breadcrumbs": "exception_only",
    "capture_probe_events": "buffer_only",
    "immediate_client_error_statuses": [],
    "immediate_client_error_path_rules": []
  },
  "overrides": {
    "capture_logs": null,
    "capture_request_events": null,
    "capture_breadcrumbs": null,
    "capture_probe_events": null,
    "immediate_client_error_statuses": null,
    "immediate_client_error_path_rules": null
  }
}

policy is the fully resolved capture policy. overrides preserves the raw saved state so clients can distinguish use preset default from explicit values such as [] for client error incidents.

Update Capture Policy

PATCH /v1/projects/{id}/capture-policy
curl -X PATCH https://api.debugbundle.com/v1/projects/proj_01HXYZ.../capture-policy \
  -H "Authorization: Bearer dbundle_mem_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "preset": "investigative",
    "immediate_client_error_statuses": [401, 403, 409, 422],
    "immediate_client_error_path_rules": [
      { "status_code": 404, "path_pattern": "/checkout/*", "methods": ["GET", "POST"] }
    ]
  }'

Presets

PresetLogsRequest EventsBreadcrumbsProbe EventsClient Error Incidents
minimalerrorfailures_onlylocal_onlybuffer_only[]
balancedwarningfailures_onlyexception_onlybuffer_only[]
investigativeinfoallstandalonestandalone_when_activated[401,403,409,422]

Setting a preset changes the resolved defaults. Individual fields remain override-based:

  • Omitted fields keep their existing override state.
  • null clears an override and returns that field to the preset default.
  • immediate_client_error_statuses: [] means explicit none.
  • immediate_client_error_statuses: [401,403,409,422] promotes those 4xx statuses into immediate incidents.
  • immediate_client_error_path_rules promotes only matching 4xx status+path+method combinations, for example 404 under /checkout/*, without promoting every 404.
  • Unpromoted 4xx responses remain request telemetry/context when captured; they do not open incidents merely because they repeat.

Next Steps

On this page