Skip to main content
POST
Creates a report: a grid with one row per document and one column per question. Each cell holds the AI’s answer to that column’s question for that row’s document. Choose where the rows come from:
  • 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. If your organisation does not have reports that follow a repository, the repository’s documents are imported once instead: the report has a row for each document it holds now, and later changes to the repository do not change the report. Documents from a confidential source are never copied into a report, whoever creates it.
  • 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.
You can pass the columns now, or add them later with Add columns. On a report of files, cells stay 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 with reports: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 when the request starts an operation: with run: true, or with repository_id when the documents are imported once. 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 or import. Otherwise 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. Without reports that follow a repository, its documents are imported once instead. 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

Returns 201 with the new report and its columns. The response also carries operation_id:
  • With run: true, operation_id is the report_run operation. Wait for it with Get operation, as described in Long-running operations.
  • With repository_id, when the documents are imported once, operation_id is the report_import operation.
  • Otherwise operation_id is null.
With repository_id, row_count starts at 0. The repository’s documents are added in the background, and each new row’s cells are computed without a run.
  • When the rows follow the repository, repository_id is the repository and sync_status is syncing. The report is filled when sync_status is synced and no cell from List cells is empty, pending or computing.
  • When the documents are imported once, repository_id and sync_status are null, because the rows do not follow the repository. Wait for the report_import operation with Get operation: it succeeds once every document has been imported, with rows_added and rows_failed in its result. The report is filled when the operation has succeeded and no cell is empty, pending or computing. Columns you add later also compute without a run.

Errors