Bugsink API
Use Bugsink’s canonical REST API to query issues and events and manage your projects. The Sentry-compatible API supports Sentry SDKs and tools such as sentry-cli.
Browse the full, generated API reference.
What the API can do
For new integrations, use the Bugsink-specific canonical API at /api/canonical/0/.
The /api/0/ and /api/<project-id>/ paths serve Sentry compatibility, including
event ingestion and debug-file uploads.
The canonical API provides endpoints for:
- Teams: list, create, retrieve and update teams.
- Projects: list, create, retrieve and update projects.
- Releases: list, create and retrieve releases.
- Issues: list and retrieve issues; resolve, reopen, mute, unmute or delete them.
- Events: list events belonging to an issue and retrieve the complete event payload.
- Comments: add a comment to an issue’s history.
List endpoints use cursor pagination. Follow the next and previous URLs in the
response rather than constructing cursors yourself. Lists that belong to another
resource require an explicit filter: issues require ?project=<project-id> and
events require ?issue=<issue-id>.
Most endpoints exchange JSON. Exact request fields, filters, sort options, response schemas and status codes are in the generated API reference.
Authentication
The API uses bearer tokens. Create one from the “Tokens” menu item in the Bugsink navigation, selecting its capabilities and scope. Store tokens as secrets; revoke them from the token list when they are no longer needed.
Send the token in the Authorization header:
curl --fail \ --header "Authorization: Bearer $BUGSINK_TOKEN" \ "$BUGSINK_URL/api/canonical/0/projects/"curl --fail \ --header "Authorization: Bearer $BUGSINK_TOKEN" \ "$BUGSINK_URL/api/canonical/0/projects/"
Token types and scope
New in Bugsink 2.6.0
Token access depends on three settings:
- Capabilities select which operations the token can perform. Granting a capability does not grant the user additional permissions.
- Personal or service: personal tokens follow the creating user’s current permissions. All users can create personal tokens. Superusers can also create service tokens, which operate independently of a user account. To create a service token, clear the “Personal token” checkbox.
- One project or global: select a project to limit the token to that project’s issues, events, releases and debug files. A global token has no single-project restriction; a personal token still follows its user’s permissions.
The projects:read, projects:manage, teams:read and teams:manage capabilities
require a global token. A project-bound token cannot list projects, even its own;
configure the project ID directly in integrations that use one.
Tokens created before 2.6.0 keep their full installation-wide access after an upgrade.
OpenAPI documentation
Every Bugsink installation serves its own OpenAPI schema and interactive Swagger UI:
/api/canonical/0/schema/ /api/canonical/0/schema/swagger-ui//api/canonical/0/schema/ /api/canonical/0/schema/swagger-ui/
The schema is the authoritative description of the API for your installed Bugsink version. It can also be used to generate a client.
Download the OpenAPI specification for the version documented on this website.
Stacktraces as Markdown
An event’s complete JSON payload is the structured choice for software that needs individual fields. For people and LLMs, Bugsink can also render the stacktrace, source context and local variables as Markdown:
curl --fail \ --header "Authorization: Bearer $BUGSINK_TOKEN" \ --header "Accept: text/markdown" \ "$BUGSINK_URL/api/canonical/0/events/$EVENT_ID/stacktrace/"curl --fail \ --header "Authorization: Bearer $BUGSINK_TOKEN" \ --header "Accept: text/markdown" \ "$BUGSINK_URL/api/canonical/0/events/$EVENT_ID/stacktrace/"
The regular JSON event response also includes this rendering in its stacktrace_md
field. The Markdown is a presentation format: it may change between Bugsink versions
and should not be parsed as a stable interface.
The Bugsink web interface offers related, session-authenticated Markdown views. Event pages have a Markdown link at the bottom. An issue summary, including status, counts, tags, history and its latest stacktrace, is available at:
/issues/issue/<issue-uuid>/md//issues/issue/<issue-uuid>/md/
Add ?download to download that summary as a .md file.
Stacktraces and local variables can contain credentials, personal data and other sensitive values. Take the destination’s data handling into account before sharing them.
Capabilities
Each endpoint in the generated API reference states its
required capability. A token without that capability receives a 403 Forbidden
response. These requirements apply to both the canonical and Sentry-compatible
APIs; SDK event ingestion continues to use the project’s DSN.
The table below lists all capabilities, their descriptions from the token form, and the REST endpoints they allow. Paths are relative to your Bugsink instance.
