SaaSFlow
DevelopersAPIReferencereports

Create report

Start generating a performance report for one month. This returns as soon as the agent run is queued, giving back a `reportId` to poll and a `runId` for following the agent, so the document is not ready yet. Because an AI agent reads company data to write it, a company that has not consented to the agent's AI provider gets a 403 carrying `code: "aiConsentRequired"` and the `providerKey` to request consent for. Only one report generates per company at a time (409), and there is a per-company rate limit (429, with `retryAt` when it can be retried).

Authentication

You're not signed in. Either sign in at app.saasflow.com and reload (then pick sessionCookie), or paste a SaaSFlow sf_… API key in the bearerAuth field below.
POST
/companies/{companyId}/reports

Authorization

Authorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

In: header

Path Parameters

companyId*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/companies/string/reports" \  -H "Content-Type: application/json" \  -d '{    "reportMonth": "string"  }'
{  "reportId": "string",  "runId": "string"}