---
title: "Create Report"
method: POST
path: "/api/businesses/{business_id}/reports"
tags: ["reports"]
---

# Create Report

`POST /api/businesses/{business_id}/reports`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/businesses/{business_id}/reports`
- Auth: HTTP bearer

Create a new report, optionally from a template.

## Path parameters

- `business_id` string, required

## Request body

- CreateReportRequest: Request to create a new report.
  - `template_id` string, nullable
  - `report_type` string
  - `title` string, nullable
  - `custom_sections` CustomSectionInput[], nullable: Sections extracted from reference analysis (overrides template sections)
    - `section_id` string, required
    - `title` string, required
    - `template_text` string
    - `description` string
  - `custom_style` object, nullable: Style preferences extracted from reference analysis (stored in report config)
  - `reference_files` object[], nullable: Metadata for uploaded reference files
  - `enable_document_query` boolean: When true, each section will query the data room via RAG at generation time
  - `pre_teaser_config` PreTeaserConfigInput: Payload for creating a pre-teaser report with rebranded content.
    - `sections` PreTeaserSectionInput[], required
      - `section_id` string, required
      - `title` string, required
      - `content_markdown` string
    - `source_business_name` string, required: Business name detected in the uploaded report (to replace)
    - `uploaded_references` object[], nullable: Metadata for uploaded source PDFs

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/flagpost/apis/flagpost-api.md) - [All operations](https://skmtc.dev/flagpost/apis/flagpost-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flagpost/apis/flagpost-api/revisions/0308cef485ca?raw)
