ReportsGenerate a reportpost

Generate a report

Magic report endpoint. Provide either explicit document_ids, or a vault_id to use the latest document_limit Vault documents. analyze_instruction=true can auto-create missing tags before…

curl -X POST "https://api.textmine.com/v3/reports" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "vault_id": 12345,
  "document_limit": 25,
  "analyze_instruction": true,
  "prompt": "Summarise termination, renewal, governing law, liability cap, and assignment restrictions."
}'
{
  "id": 7001,
  "vault_id": 12345,
  "team_id": 321,
  "document_ids": [
    123
  ],
  "document_names": [
    "John Doe"
  ],
  "total_documents_in_vault": 42,
  "documents_returned": 42,
  "document_limit": 42,
  "prompt": "example_string",
  "result": "example_string",
  "reasoning": "example_string",
  "status": "PROCESSING",
  "error_code": "example_string",
  "error_description": "example_string",
  "request_date": "2024-12-25T10:00:00Z",
  "response_date": "2024-12-25T10:00:00Z",
  "created_at": "2024-12-25T10:00:00Z",
  "created_by_id": 123,
  "created_by_name": "John Doe",
  "instruction_analysis_enabled": true,
  "tags_created": 42,
  "tags_already_existed": 42,
  "instruction_analysis_message": "example_string"
}
POST
/v3/reports
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (`tm_<key>`)
Bearer Tokenstring
Required

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
Content-Typestring
Required

The media type of the request body

Options: application/json
vault_idinteger
Format: int64
document_limitinteger
Min: 1 • Max: 200
template_idinteger
Format: int64
analyze_instructionboolean

When true, TextMine can create missing tags needed by the report instruction before running.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tm_<key>). Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Body

application/json
promptstring
Example:
Summarise termination, renewal, governing law, liability cap, and assignment restrictions.
vault_idinteger
Example:
12345
analyze_instructionboolean

When true, TextMine can create missing tags needed by the report instruction before running.

Example:
true

Responses

Magic report endpoint. Provide either explicit document_ids, or a vault_id to use the latest document_limit Vault documents. analyze_instruction=true can auto-create missing tags before running.