---
title: "Generate a configurable PDF health report"
method: POST
path: "/api/health/report/export"
tags: ["Health"]
---

# Generate a configurable PDF health report

`POST /api/health/report/export`

## Request

- Base URL: `https://api.rewritelifestyle.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rewritelifestyle.ai/api/health/report/export`
- Auth: HTTP bearer

User selects which sections to include and a date range. Returns application/pdf binary. Generation time: 2–8 seconds. Sections: weight_body_composition, health_improvements, activity_movement, nutrition_logs, journey_timeline.

## Request body

- ExportHealthReportDto
  - `sections` string[], required: Sections to include in the PDF. At least one required.
  - `date_range` ReportDateRangeDto, required
    - `preset` 'last_30_days' | 'last_3_months' | 'all_time' | 'custom', required
    - `from` string: Required when preset = "custom"
    - `to` string: Required when preset = "custom"

## Response `201`

---

[API](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api.md) - [All operations](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/revisions/28695827f27a?raw)
