Reports
Create Report
Create a report over a repository or a set of files, optionally with columns, and optionally start it.
POST
Preview. This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive
403 mcp_not_enabled. See the preview overview.repository_id: the rows follow the repository. A document added to it gets a row, and a document removed from it loses its row. The rows fill in the background, and their cells compute as they arrive, as in the app. Your organisation needs reports that follow a repository enabled.file_ids: one row per file. Each file is copied into the report. Add more later with Add Rows.- Neither: the report starts with no rows. Add them with Add Rows.
empty until a run computes them. Set run: true to start the first run straight away, or call Run Report when you are ready.
Authentication
Requires an API key, or an OAuth token withreports:write. Passing repository_id also needs repositories:read, and passing file_ids also needs files:read. The caller’s role must allow creating reports.
Headers
string
A unique string for this request, such as a UUID. Honoured with
run: true: a repeat with the same key within 30 days returns the same report with 200, so a retry never creates a second report or starts a second run. Without run the key is ignored: after a timeout, list your reports before you retry.Body parameters
string
required
The report’s name, up to 200 characters.
string
What the report is for.
string
A repository whose documents become the rows, and stay the rows as it changes. Cannot be combined with
file_ids or run.string[]
Files that become the rows, from
1 to 10 ids. Each must be a .pdf, .docx, .doc, .pptx or .png file. Cannot be combined with repository_id.object[]
Up to 20 columns to create with the report.
boolean
default:"false"
Start computing every cell as soon as the report is created. Needs
file_ids and at least one column. The cells’ credit cost is checked against your organisation’s per-operation limit before anything is created.Response
Returns201 with the new report and its columns. The response also carries operation_id:
- With
run: true,operation_idis thereport_runoperation. Wait for it with Get Operation, as described in Long-running operations. - With
run: false,operation_idisnull.
repository_id, row_count starts at 0 and grows as the repository’s documents are added in the background.