Generate Report

Generate a downloadable report (e.g. US payroll employees) for a company. Returns the file bytes base64-encoded plus its filename and content type, so CSV and binary XLSX flow through the typed API uniformly. This is the self-serve admin surface; Ops/Retool use the equivalent token-gated endpoint which produces identical output.

Authentication

X-Thera-API-Keystring
API Key authentication via header

Path parameters

companyIdstringRequired

Query parameters

reportTypeenumRequired
Which report to generate.
Allowed values:
formatenumRequired
Output file format.
Allowed values:
includeTerminatedbooleanOptional
If true, include terminated employees. The Status column is always present in every row regardless of this flag.

Response

This endpoint returns an object.
filenamestring
contentTypestring
base64Contentstring

The report file bytes, base64-encoded. Decode to a Blob using contentType and download using filename.