Guide · Last updated: 2026-11-22

Send bug reports from your own app via REST API

Your own report form, bugd.one as the backend: send reports via POST, store the reporter token, fetch status and replies, badge counts via status batch.

Language: Deutsch

The widget is convenient, but it does not fit every app: in a native app, a game or a site with its own design you want your own form. Then bugd.one is just the backend: you collect the data yourself, send it over HTTP and later show the user status and replies in your own interface.

Prerequisites

  • A bugd.one project and its publishable key (bk_live_…) under Project → Settings. It may live in web, Android and iOS apps.
  • Optionally for server-side calls: the server key (bk_server_…). It is shown only once; if you lose it, you rotate it.
  • The base URL is https://bugd.one/api. Errors always come as JSON { "error": "…", "code": "…" }.
Project settings with API key and allowed domains
Project → Settings: this is where you find the API key (bk_live_…) and set the allowed domains.

Step by step

Step 1: Send a report

The simplest call needs only a title:

curl -X POST https://bugd.one/api/v1/reports \
  -H "X-API-Key: bk_live_YOUR_PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Login button does not respond",
    "description": "Nothing happens after tapping.",
    "app_version": "2.4.1",
    "source": "android",
    "metadata": { "device": "Pixel 8", "os": "Android 15" },
    "labels": ["login"]
  }'

The response:

{
  "success": true,
  "id": "1f0c…",
  "bug_number": 42,
  "status": "new",
  "reporter_token": "x7Kq…",
  "status_url": "https://bugd.one/status/1f0c…"
}

The most important fields: title (required, max. 500 characters), description (max. 9,500), app_version, source (web, android, ios …), environment (default production), url (trimmed to origin and path), metadata (flat object, up to 30 keys), labels (up to 10). Your own custom fields from the dashboard go into metadata[key]; GET /v1/config tells you which ones exist.

If you send user.email or user.name, you also need "consent": true — the reporter must have agreed to storage, otherwise the API answers 422 consent_required. With the email address the reporter receives emails on status changes. Put your own user ID in user.id (max. 200 characters); do not store an email address there.

Step 2: Attach screenshots

Send small images as a data URI in screenshot_url (PNG, JPEG, GIF or WebP, max. 5 MB) and up to three more in attachments. For native apps multipart/form-data is more efficient because the Base64 overhead disappears:

curl -X POST https://bugd.one/api/v1/reports \
  -H "X-API-Key: bk_live_YOUR_PROJECT_KEY" \
  -F "title=Crash when saving" \
  -F "app_version=3.0.0" -F "source=ios" \
  -F "metadata={\"device\":\"iPhone 16\",\"os\":\"iOS 26\"}" \
  -F "screenshot=@screenshot.png;type=image/png"

Step 3: Store the reporter token

The reporter_token is the reporter's key to exactly this report. It comes in this one response only. Store it with the id somewhere only your app reads: Keychain (iOS), EncryptedSharedPreferences (Android), localStorage (web). In TypeScript:

const API = 'https://bugd.one/api/v1'
const KEY = 'bk_live_YOUR_PROJECT_KEY'

export async function sendReport(title: string, description: string) {
  const res = await fetch(`${API}/reports`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', 'X-API-Key': KEY },
    body: JSON.stringify({ title, description, source: 'web', app_version: '2.4.1' }),
  })
  if (!res.ok) throw new Error((await res.json()).error ?? `HTTP ${res.status}`)
  const { id, bug_number, reporter_token } = await res.json()

  const list = JSON.parse(localStorage.getItem('myReports') ?? '[]')
  list.unshift({ id, bug_number, title, token: reporter_token })
  localStorage.setItem('myReports', JSON.stringify(list.slice(0, 50)))
  return bug_number as number
}

Step 4: Show status and replies

With the token the app reads the current state — without an API key:

export async function loadReport(id: string, token: string) {
  const res = await fetch(`${API}/reports/${id}`, { headers: { 'X-Reporter-Token': token } })
  if (res.status === 404) return null          // deleted or token invalid
  return (await res.json()) as {
    report: { id: string; bug_number: number; title: string; status: string; fixed_in_version: string | null }
    messages: Array<{ id: string; content: string; from_reporter: boolean; created_at: string }>
  }
}

status runs through new, confirmed, in_progress and ends in fixed, wont_fix or duplicate. Only replies you marked in the dashboard as reply to the reporter are visible; internal comments stay internal.

Step 5: Reply as the reporter

await fetch(`${API}/reports/${id}/messages`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'X-Reporter-Token': token },
  body: JSON.stringify({ content: 'Pixel 8 with Android 15' }),
})

The message (max. 5,000 characters) goes to the watchers of the report on your team. The endpoint expects Content-Type: application/json, otherwise it answers 415.

Step 6: A badge for new replies via status batch

To show “2 new replies” in your app, query all locally stored reports with a single call (up to 50, no API key, 30 requests per minute and IP):

const res = await fetch(`${API}/reports/status`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ reports: list.map((r) => ({ id: r.id, token: r.token })) }),
})
const { reports } = await res.json()
// [{ id, status, updated_at, reply_count, last_reply_at } | { id, gone: true }]

Remember per report the last seen status and reply_count; the differences make up the number in the badge. gone: true means the report was deleted or the token is invalid — remove it locally.

Step 7: Server-side: “My reports” without tokens

If your user is logged in, you can skip the tokens. Send user.id when reporting and query from your backend with the server key:

curl "https://bugd.one/api/v1/reports?external_user_id=usr_123&status=new&limit=50" \
  -H "Authorization: Bearer $BUGD_SERVER_KEY"

The response contains reports and a next_cursor for the next page. With POST /v1/reports/{id}/messages and the same server key you answer publicly as support ({ "content": "…", "author": "Support-Bot" }). The server key must never end up in an app or in the frontend.

Step 8: Environment and test

Send environment: "development" (or staging) from debug builds. Such reports appear in the dashboard with a DEV marker but send no emails, webhooks or chat messages. First check with a test report that it shows up under Reports.

Bug detail view with description, console output, metadata and screenshot
Bug detail: screenshot, page, browser and console errors arrive automatically. Change the status and the reporter is notified.

What gets stored

FieldContent
Contenttitle, description, labels, custom fields from metadata
Contextapp_version, source, environment, page (origin and path only)
Attachmentsscreenshot and up to 3 more files
Reporteroptionally name and email (with consent), your own user ID
Consoleconsole_logs (max. 5,000 characters), appended to the description

The field replay is silently ignored for older widget versions — session replay no longer exists.

Limits and notes

For crashes there is a separate endpoint, POST /v1/crashes, with the same keys — details in the guides for Android and Flutter.

Further reading

Frequently asked questions

Do I need an SDK to send reports?
No. The whole public API is plain HTTP with JSON (or multipart for screenshots). The widget, the crash reporter and the mobile SDKs use exactly the same endpoints. The machine-readable specification is at /openapi.json, the detailed description at /api-reference.md.
Which key may I ship in my app?
Only the publishable key (bk_live_…). It may send reports and crashes and read the configuration. The server key (bk_server_…) reads all reports of the project and belongs in your backend or CI only.
How does a user see the status of their report later?
The response to POST /v1/reports contains a reporter_token. Store it together with the id locally (Keychain, SharedPreferences, localStorage). With GET /v1/reports/{id} and the header X-Reporter-Token the app reads status and public replies.
Can I check several reports for changes at once?
Yes. POST /v1/reports/status takes up to 50 pairs of id and token and returns status, number of team replies and time of the last reply per report — ideal for a badge. The endpoint needs no API key.
Which limits apply?
At most 20 reports per minute per IP; exceeding it returns 429 rate_limited. There is no report quota. If the project owner has no active plan (trial ended), you get 403 project_read_only.

Up and running in two minutes

Create an account, add a project, paste your key — all Pro features free for 7 days, no credit card required.

Try free for 7 days · Read the docs · All guides