Prepare or reuse a source-grounded workflow draft
const url = 'https://api.invogi.com/v1/workflow-assistance/generate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"input":{"task":"SUPPLIER_REPLY","caseId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","sourceText":"example","supplierId":"example","companyId":"example","sourceId":"example","proposalId":"example","checkId":"example","month":"example","entityScope":"example","currencyScope":"example","from":"example","to":"example","query":"example"},"fingerprint":"example","consent":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/workflow-assistance/generate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "input": { "task": "SUPPLIER_REPLY", "caseId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceText": "example", "supplierId": "example", "companyId": "example", "sourceId": "example", "proposalId": "example", "checkId": "example", "month": "example", "entityScope": "example", "currencyScope": "example", "from": "example", "to": "example", "query": "example" }, "fingerprint": "example", "consent": true }'Signed-in dashboard Analyst, Admin or Owner only; API keys are refused. No AI output makes a financial decision. Requires Owner-enabled external processing and explicit consent to the preview. Sources must still match. Shared AI policy (ai-assistance-policy@1): generation requires the workspace’s effective AI mode, task rollout and Owner processing setting (see GET /organizations/current/ai-assistance); one successful, nonempty result uses one unit of the shared allowance, while empty, failed or stale output does not. A shared guard allows 30 requests per workspace per hour and two concurrent preparations. Refusals carry error.details.reason (for example ROLLOUT_OFF, NOT_ENROLLED, TASK_PAUSED, ALLOWANCE_EXHAUSTED with resets_at, SERVICE_LIMIT). Current ready drafts and in-flight preparations are reused per requester and source fingerprint without another provider call. Compatibility contract for older clients: always a completed draft (201) or CONFLICT with error.details.preparation_id while the work continues (Retry-After); long price-document work is waited on for a bounded time only. New clients use POST /ai-preparations. Unapplied drafts expire after 24 hours; accepted evidence remains with the record. Model prose is advisory; authoritative financial figures remain separate server facts.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
Responses
Section titled “Responses”Canonical result
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "version": "invogi.workflow-assistance.v1", "input": { "task": "SUPPLIER_REPLY" }, "content": { "filters": { "status": "open", "severity": [ "INFO" ], "disposition": [ "OPEN" ], "assignee": "all", "sla": "overdue", "view": "recovery_candidates" } }, "status": "SOURCE"}Invalid request
Missing or invalid API key
API key lacks required scope/role
Resource not found
Conflicting idempotency key or resource processing state
Request-rate or customer-usage limit exceeded; inspect the stable error code