---
title: "Create User Report"
method: POST
path: "/user-reports"
tags: ["user-reports"]
---

# Create User Report

`POST /user-reports`

Persist a browser-submitted user report via the backend.

Args:
    request: User report payload from the frontend.
    auth: Authenticated user context.
    service: User report service.

Returns:
    The created report identifier.

## Request body

- UserReportCreateRequest — Request body for creating a user report. Attributes: report_type: Report category selected in the frontend. title: Short summary generated from the description. description: Full report body provided by the user. selected_element: Optional DOM snapshot for highlighted elements. attachments: Optional uploaded attachment URLs. page_url: Browser URL where the report was filed. user_agent: Browser user agent string. screen_size: Browser viewport dimensions. created_at: Client timestamp preserved for backward compatibility.
  - `report_type` 'bug' | 'improvement' | 'question' | 'praise' | 'feature' | 'performance' | 'accessibility' | 'security' | 'documentation' | 'other', required — Selected report category.
  - `title` string, required — Short generated title.
  - `description` string, required — Full user report text.
  - `selected_element` object, nullable — Optional highlighted DOM element snapshot.
  - `attachments` string[], nullable — Uploaded attachment URLs.
  - `page_url` union, required — Browser URL where the report was created.
    - string, uri
    - string
  - `user_agent` string, nullable — Browser user agent string.
  - `screen_size` object, nullable — Viewport dimensions captured in the browser.
  - `created_at` string, nullable — Optional client timestamp retained for compatibility.

## Response `201`

Successful Response

- UserReportCreateResponse — Response after persisting a user report.
  - `success` boolean, required — Whether the report was created.
  - `report_id` string, required — Persisted report UUID.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/31dfe831e079/schema)
