Documentation Index
Fetch the complete documentation index at: https://docs.cf0.ai/llms.txt
Use this file to discover all available pages before exploring further.
The Reports API provides read and write access to the research reports generated by cf0’s Lab. Reports are identified by a report_id and scoped to your organisation.
All Reports endpoints are prefixed with /api/reports.
All reports endpoints require organisation membership. Requests without a valid org_id in the token return HTTP 403.
List reports
Returns the authenticated user’s reports, paginated.
Query parameters
Maximum number of reports to return. Default: 50.
Number of reports to skip. Default: 0.
Response
Array of report metadata objects.
Number of reports in this response.
curl "https://api.cf0.ai/api/reports?limit=20&offset=0" \
-H "Authorization: Bearer <your-token>"
GET /api/reports/{report_id}
Returns metadata for a single report.
curl https://api.cf0.ai/api/reports/rpt_abc123 \
-H "Authorization: Bearer <your-token>"
Get report PDF URL
GET /api/reports/{report_id}/pdf
Returns a short-lived download URL for the report PDF. The URL expires after 5 minutes.
Temporary download URL. Valid for 5 minutes.
curl https://api.cf0.ai/api/reports/rpt_abc123/pdf \
-H "Authorization: Bearer <your-token>"
Example response:
Get report data
GET /api/reports/{report_id}/data
Returns the structured report content. Use this to read section content for programmatic editing.
The response includes a sections array. Each section has:
Get reports for a thread
GET /api/reports/thread/{thread_id}
Returns all reports linked to a research thread.
Array of report metadata objects associated with the thread.
Get version chain
GET /api/reports/lineage/{lineage_id}
Returns all versions of a report across its edit history.
Ordered array of report versions, oldest to newest.
Edit a section
PATCH /api/reports/{report_id}/sections/{section_idx}
Edits a section’s title or narrative, recompiles the PDF, and saves the result as a new version.
Rate limit: 6 requests per minute per user.
Path parameters
Zero-based index of the section to edit.
Request body
Updated prose content for the section.
Optional description of what changed, stored in the activity log.
At least one of narrative or title must be provided.
curl -X PATCH https://api.cf0.ai/api/reports/rpt_abc123/sections/0 \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"narrative": "Revenue grew 122% year-over-year, driven by data center demand.",
"change_summary": "Updated revenue narrative with Q4 actuals"
}'
Preview a section rewrite
POST /api/reports/{report_id}/sections/{section_idx}/rewrite
Uses an LLM to rewrite a section according to your instruction. Does not persist — returns the rewritten text for review before you apply it with PATCH.
Rate limit: 10 requests per minute per user.
Request body
Plain-language instruction for how to rewrite the section. Maximum 2000 characters.
Response
The rewritten section text. Apply it using the section edit endpoint.
curl -X POST https://api.cf0.ai/api/reports/rpt_abc123/sections/0/rewrite \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{ "instruction": "Make it more concise and remove the forward-looking language." }'
Get activity log
GET /api/reports/{report_id}/activity
Returns the edit activity log for a report.
Array of activity log entries, each describing a change event.
Delete report
DELETE /api/reports/{report_id}
Permanently deletes a report and all associated files (PDF, data, artifacts).
true if the report was deleted successfully.
curl -X DELETE https://api.cf0.ai/api/reports/rpt_abc123 \
-H "Authorization: Bearer <your-token>"
Returns { "deleted": true } on success, or HTTP 404 if the report was not found.