---
title: "Create Bug Report"
method: POST
path: "/bug-reports"
tags: ["Bug Reports"]
---

# Create Bug Report

`POST /bug-reports`

## Request body

- BugReportCreate
  - `annotations` BugReportAnnotation[], required
    - `comment` string, required
    - `x` number, required
    - `y` number, required
    - `width` number, required
    - `height` number, required
    - `selector` string, nullable
    - `test_id` string, nullable
    - `element_html` string, nullable
  - `context` DiagnosticContext, required — What a client sends: both halves, flat, as one object. The client has no reason to know how the server splits its payload, and the bug report channel stores it whole.
    - `console` ConsoleEntry[]
      - `level` 'log' | 'info' | 'warn' | 'error' | 'debug', required
      - `message` string, required
      - `at` string, date-time, required
    - `network` NetworkEntry[]
      - `method` string, required
      - `url` string, required
      - `status` integer, nullable
      - `duration_ms` integer, nullable
      - `at` string, date-time, required
      - `response_body` string, nullable
    - `route_history` RouteVisit[]
      - `route` string, required
      - `at` string, date-time, required
    - `click_trail` ClickEntry[]
      - `test_id` string, nullable
      - `tag` string, required
      - `label` string, nullable
      - `at` string, date-time, required
    - `posthog_replay_url` string, nullable
    - `posthog_distinct_id` string, nullable
    - `posthog_session_id` string, nullable
    - `sentry_replay_id` string, nullable
    - `sentry_last_event_id` string, nullable
    - `url` string, nullable
    - `route` string, nullable
    - `captured_at` string, date-time, nullable
    - `timezone` string, nullable
    - `locale` string, nullable
    - `platform` 'web_desktop' | 'web_mobile' | 'pwa_standalone' | 'ios_native' | 'android_native', nullable
    - `user_agent` string, nullable
    - `app_version` string, nullable
    - `native_build_version` string, nullable
    - `ota_bundle_version` string, nullable
    - `ota_active` boolean, nullable
    - `viewport_width` integer, nullable
    - `viewport_height` integer, nullable
    - `document_width` integer, nullable
    - `document_height` integer, nullable
    - `scroll_x` integer, nullable
    - `scroll_y` integer, nullable
    - `device_pixel_ratio` number, nullable
    - `is_mobile` boolean, nullable
    - `prefers_dark` boolean, nullable
    - `online` boolean, nullable
    - `connection_type` string, nullable
    - `page_load_ms` integer, nullable
    - `time_on_route_ms` integer, nullable
  - `screenshot_base64` string, nullable

## Response `200`

Successful Response

- BugReportResponse
  - `id` string, required
  - `title` string, required
  - `reporter_id` string, required
  - `reporter_email` string, nullable
  - `annotations` BugReportAnnotation[], required
    - `comment` string, required
    - `x` number, required
    - `y` number, required
    - `width` number, required
    - `height` number, required
    - `selector` string, nullable
    - `test_id` string, nullable
    - `element_html` string, nullable
  - `context` DiagnosticContext, required — What a client sends: both halves, flat, as one object. The client has no reason to know how the server splits its payload, and the bug report channel stores it whole.
    - `console` ConsoleEntry[]
      - `level` 'log' | 'info' | 'warn' | 'error' | 'debug', required
      - `message` string, required
      - `at` string, date-time, required
    - `network` NetworkEntry[]
      - `method` string, required
      - `url` string, required
      - `status` integer, nullable
      - `duration_ms` integer, nullable
      - `at` string, date-time, required
      - `response_body` string, nullable
    - `route_history` RouteVisit[]
      - `route` string, required
      - `at` string, date-time, required
    - `click_trail` ClickEntry[]
      - `test_id` string, nullable
      - `tag` string, required
      - `label` string, nullable
      - `at` string, date-time, required
    - `posthog_replay_url` string, nullable
    - `posthog_distinct_id` string, nullable
    - `posthog_session_id` string, nullable
    - `sentry_replay_id` string, nullable
    - `sentry_last_event_id` string, nullable
    - `url` string, nullable
    - `route` string, nullable
    - `captured_at` string, date-time, nullable
    - `timezone` string, nullable
    - `locale` string, nullable
    - `platform` 'web_desktop' | 'web_mobile' | 'pwa_standalone' | 'ios_native' | 'android_native', nullable
    - `user_agent` string, nullable
    - `app_version` string, nullable
    - `native_build_version` string, nullable
    - `ota_bundle_version` string, nullable
    - `ota_active` boolean, nullable
    - `viewport_width` integer, nullable
    - `viewport_height` integer, nullable
    - `document_width` integer, nullable
    - `document_height` integer, nullable
    - `scroll_x` integer, nullable
    - `scroll_y` integer, nullable
    - `device_pixel_ratio` number, nullable
    - `is_mobile` boolean, nullable
    - `prefers_dark` boolean, nullable
    - `online` boolean, nullable
    - `connection_type` string, nullable
    - `page_load_ms` integer, nullable
    - `time_on_route_ms` integer, nullable
  - `screenshot_url` string, nullable
  - `status` 'open' | 'resolved', required
  - `created_at` string, date-time, required
  - `resolved_at` string, date-time, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-05** `437cd8414e9e` — 18 breaking, 60 info
  - the response property `context/document_height` became optional for the status `200`
  - the response property `context/document_width` became optional for the status `200`
  - the response property `context/route` became optional for the status `200`
  - the response property `context/url` became optional for the status `200`
  - …74 more

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/bug-reports/post.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/437cd8414e9e/schema)
