API Reference / Finance - ROI

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

NameTypeRequiredDescription
from string (date) yes
to string (date) yes
budgetId integer (int64) no
force boolean no

Response 202

application/json · ApiResponseAiGenerationJobResponseDto

FieldTypeDescription
success boolean
message string
data AiGenerationJobResponseDto

Status codes

  • 202 — Generation job accepted
  • 400 — Invalid date range, range exceeds 90 days, or missing org context
  • 401 — Authentication required
  • 403 — Insufficient permissions for Finance pillar
  • 429 — —

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.