Generate ROI AI insights (async)
post
https://api.intelig.ai/api/v1/intelig/finance/roi/generate
Auth: Authorization: ApiKey <key> (an API key sent as
Bearer is rejected) or Authorization: Bearer <jwt>
for a dashboard session. operationId: generateAiInsights
Submits an async AI generation job for ROI insights. Returns immediately with a jobId. Poll GET /generate/status for completion. Use force=true to clear caches before regenerating. Date range max 90 days. Optionally scoped to a specific budget via budgetId parameter.
Example request
curl -X POST "https://api.intelig.ai/api/v1/intelig/finance/roi/generate?from=string&to=string" \
-H "Authorization: ApiKey $INTELIG_API_KEY" Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string (date) | yes | — |
to | string (date) | yes | — |
budgetId | integer (int64) | no | — |
force | boolean | no | — |
Response 202
application/json · ApiResponseAiGenerationJobResponseDto
| Field | Type | Description |
|---|---|---|
success | boolean | — |
message | string | — |
data | AiGenerationJobResponseDto | — |
Status codes
202— Generation job accepted400— Invalid date range, range exceeds 90 days, or missing org context401— Authentication required403— Insufficient permissions for Finance pillar429— —
Every response is wrapped in { success, message, data }. A 4xx means the request
is wrong — do not retry it unchanged. A 429 carries Retry-After in seconds.