{"openapi":"3.1.0","info":{"title":"Nexra platform API","version":"2026-10-01","description":"The Nexra platform API lets your own software do what the Nexra console does: build and run integrations, follow every run, manage connections, triggers and reconciliations, receive signed events and answer approvals.\n\n**Authentication.** Send a Nexra access token as `Authorization: Bearer <token>` and the workspace to act in as `X-Workspace-Id: <workspaceId>`. Sign in with the Nexra CLI (`nexra auth login`) to get a token; it carries your own role, so the API can do exactly what you can do in the console. Public operations need no token.\n\n**Errors.** Every error has the same JSON shape: `error`, `message`, `statusCode`, `requestId` and `path`, plus a stable `code` where one exists. Quote the `requestId` (also sent as the `X-Request-ID` header) when you contact support.\n\n**Lists.** List operations return the newest items first, as a plain array capped at a documented size. Operations that page with a cursor return `{ items, nextCursor }`; pass `nextCursor` back as `cursor` until it is `null`.\n\n**Retries.** Requests that start work (for example starting a run) take an `idempotencyKey`. Sending the same key again returns the first result instead of starting the work twice, so it is safe to retry after a network error.\n\n**Versioning.** This description is version 2026-10-01. Adding an operation or an optional field is not a breaking change; a breaking change gets a new dated version.","contact":{"name":"Nexra support","url":"https://developer.amakoragroup.com/docs"}},"servers":[{"url":"https://api.nexra.amakoragroup.com","description":"Nexra"}],"tags":[{"name":"Integrations","description":"An integration groups the flows that connect two or more systems for one business purpose."},{"name":"Flows","description":"A flow moves records from a source to a destination. Flows have versions; one version is published at a time."},{"name":"Runs","description":"A run (an execution) is one pass of a published flow. Start runs, follow their progress and inspect each record."},{"name":"Schedules","description":"Run a flow on a timetable."},{"name":"Failed records","description":"Records a run could not deliver are held here so you can retry, ignore or resolve them."},{"name":"Connections","description":"A connection is an authorised account at a provider. The API returns connection metadata only, never credentials."},{"name":"End users","description":"Your own customers (end users) and the accounts they connect through your app. Send a short-lived link, record what they agreed to, withdraw access, and answer access and erasure requests."},{"name":"Records","description":"Your workspace's own records that flows use: contract obligations and their reminders, the asset-to-customer map, evidence matrices for review, and statements made from a template. Each waits for a person where it should."},{"name":"Triggers","description":"Start flows from signed webhooks, provider events, polling or uploaded files."},{"name":"Lifecycle","description":"Pause, resume, suspend, delete and restore integrations, flows and connections."},{"name":"Reconciliation","description":"Compare two sources of records, match them and review the items that need a person."},{"name":"Pensions","description":"Employer statements from contribution reconciliations, digital onboarding and benefit case packs with their timelines and sealed export, and the returns calendar. People decide every case and file every return."},{"name":"Event webhooks","description":"Receive signed events about your workspace on your own HTTPS endpoints. See the webhooks section for every event payload."},{"name":"Research","description":"Nexra for Professionals: read-only research from public registries (SEC EDGAR, Companies House, GDELT news, World Bank) and the person's own allowed tools. Plan, approve, follow progress, stop, and read a brief in which every number cites its source."},{"name":"Approvals","description":"Read and decide approval requests raised by governed actions and releases."},{"name":"Governance","description":"Read governance policies, grants, evidence and measures."},{"name":"Templates","description":"Ready-made integrations you can install into a workspace."},{"name":"Catalogue","description":"Public connector catalogue, service uptime and this API description. No sign-in needed."},{"name":"Company data","description":"Ask questions about your business's own data, and read the Leadership summary, as the person who signed in. Read only, cited and logged. These need an OAuth access token that acts for a person in a read access group; workspace API keys and service credentials are refused."},{"name":"MCP","description":"The Model Context Protocol endpoint that exposes your published integrations as tools to AI agents."}],"externalDocs":{"description":"Guides and SDK quickstarts","url":"https://developer.amakoragroup.com/docs/platform-api"},"components":{"responses":{"Error400":{"description":"The request was not valid. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"The access token is missing, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"Your role in this workspace does not allow this action, or the workspace is not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"Nothing with that id exists in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error409":{"description":"The request conflicts with the current state, for example a record that was already decided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"Too many requests. Wait for the number of seconds in `Retry-After`, then try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error500":{"description":"Nexra could not complete the request. It is safe to retry with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error503":{"description":"The service this needs is switched off or busy for your workspace. `message` says which; try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Nexra access token. Get one with `nexra auth login`; it acts with your own workspace role."},"workspaceId":{"type":"apiKey","in":"header","name":"X-Workspace-Id","description":"The workspace to act in. Without it, your oldest active workspace is used."},"mcpOAuth":{"type":"oauth2","description":"OAuth 2.1 with PKCE for MCP clients. Discover the endpoints from `/.well-known/oauth-protected-resource/mcp`.","flows":{"authorizationCode":{"authorizationUrl":"https://api.nexra.amakoragroup.com/oauth/authorize","tokenUrl":"https://api.nexra.amakoragroup.com/oauth/token","scopes":{}}}},"triggerSignature":{"type":"apiKey","in":"header","name":"X-Nexra-Signature","description":"`v1=<hex HMAC-SHA256>` over `v1:<X-Nexra-Timestamp>:<X-Nexra-Event-Id>:<raw body>`, keyed with the trigger's signing secret."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","enum":["request_failed","internal_server_error"],"description":"`request_failed` for 4xx answers, `internal_server_error` for 5xx."},"message":{"type":"string","description":"What went wrong, in plain English."},"code":{"type":"string","description":"A stable machine-readable reason, where one exists."},"statusCode":{"type":"integer"},"requestId":{"type":"string","description":"Also sent as `X-Request-ID`. Quote it when you contact support."},"path":{"type":"string"}},"required":["error","message","statusCode","requestId","path"],"example":{"error":"request_failed","message":"A bounded execution idempotency key is required.","statusCode":400,"requestId":"1f0c2a4e-6b1d-4c39-9d0f-2f8a8e1f6b7a","path":"/api/console/connect/flows/cmflow01orders/executions"}},"Lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["draft","test","live","paused","suspended","deleted"],"description":"Where the item is in its life: draft, test, live, paused, suspended or deleted."},"label":{"type":"string"},"summary":{"type":["string","null"]},"pausedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"pausedBy":{"type":["object","null"],"properties":{"userId":{"type":"string"},"name":{"type":["string","null"]}},"required":["userId","name"]},"suspendedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"suspendedBy":{"type":["object","null"],"properties":{"userId":{"type":"string"},"name":{"type":["string","null"]}},"required":["userId","name"]},"suspensionReason":{"type":["string","null"]},"deletedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"deletedBy":{"type":["object","null"],"properties":{"userId":{"type":"string"},"name":{"type":["string","null"]}},"required":["userId","name"]},"purgeAfter":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"owner":{"type":["object","null"],"properties":{"userId":{"type":"string"},"name":{"type":["string","null"]}},"required":["userId","name"]},"hasLiveFlows":{"type":"boolean"},"can":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Which lifecycle actions your role can take now, for example `pause` or `delete`."}},"required":["state","label"]},"Integration":{"type":"object","properties":{"id":{"type":"string","minLength":1},"projectId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","description":"Stored status, for example `draft`, `active` or `archived`."},"businessOwnerUserId":{"type":["string","null"]},"technicalOwnerUserId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"archivedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"pausedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"suspendedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"deletedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lifecycle":{"$ref":"#/components/schemas/Lifecycle"},"flows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]}}},"required":["id","projectId","name","slug","description","status","businessOwnerUserId","technicalOwnerUserId","createdAt","updatedAt","archivedAt","pausedAt","suspendedAt","deletedAt"]},"FlowVersion":{"type":"object","properties":{"id":{"type":"string","minLength":1},"flowId":{"type":"string"},"versionNumber":{"type":"integer"},"versionLabel":{"type":["string","null"]},"status":{"type":"string"},"triggerType":{"type":"string"},"validationStatus":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"publishedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"sourceVersionId":{"type":["string","null"]}},"required":["id","flowId","versionNumber","versionLabel","status","triggerType","validationStatus","createdAt","publishedAt","sourceVersionId"]},"Flow":{"type":"object","properties":{"id":{"type":"string","minLength":1},"integrationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string"},"activeVersionId":{"type":["string","null"],"description":"The published version runs use."},"ownerUserId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"pausedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"deletedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersion"}},"lifecycle":{"$ref":"#/components/schemas/Lifecycle"}},"required":["id","integrationId","name","slug","description","status","activeVersionId","ownerUserId","createdAt","updatedAt","pausedAt","deletedAt"]},"DeletedItem":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]},"name":{"type":"string"},"purgeAfter":{"type":"string","format":"date-time","description":"When the item is removed for good. Restore it before then."},"retentionDays":{"type":"integer"}},"required":["deleted","name","purgeAfter","retentionDays"]},"ConnectionLifecycle":{"type":"object","properties":{"suspended":{"type":"boolean"},"suspendedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"suspendedBy":{"type":["object","null"],"properties":{"userId":{"type":"string"},"name":{"type":["string","null"]}},"required":["userId","name"]},"suspensionReason":{"type":["string","null"]},"summary":{"type":["string","null"]},"can":{"type":"object","properties":{"suspend":{"type":"boolean"},"liftSuspension":{"type":"boolean"}},"required":["suspend","liftSuspension"]}},"required":["suspended","suspendedAt","suspendedBy","suspensionReason","summary","can"]},"Template":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"businessPurpose":{"type":["string","null"]},"requiredConnectors":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"installable":{"type":"boolean"}},"required":["key","name","description","category","businessPurpose","requiredConnectors","status","installable"]},"Execution":{"type":"object","properties":{"id":{"type":"string","minLength":1},"integrationId":{"type":"string"},"flowId":{"type":"string"},"flowVersionId":{"type":"string"},"triggerType":{"type":"string"},"triggerReference":{"type":["string","null"]},"status":{"type":"string","description":"For example `queued`, `running`, `succeeded`, `partially_succeeded`, `failed` or `cancelled`."},"correlationId":{"type":"string"},"idempotencyKey":{"type":"string"},"startedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"completedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"durationMs":{"type":["integer","null"]},"recordsReceived":{"type":"integer"},"recordsProcessed":{"type":"integer"},"recordsSucceeded":{"type":"integer"},"recordsFailed":{"type":"integer"},"recordsSkipped":{"type":"integer"},"retryCount":{"type":"integer"},"deadlineAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"endUserId":{"type":["string","null"],"description":"The end user (your customer) this run acted for, when it was started for one."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"replayed":{"type":"boolean","description":"True when this answer is the run first started with the same idempotency key."}},"required":["id","integrationId","flowId","flowVersionId","triggerType","triggerReference","status","correlationId","idempotencyKey","startedAt","completedAt","durationMs","recordsReceived","recordsProcessed","recordsSucceeded","recordsFailed","recordsSkipped","retryCount","deadlineAt","createdAt","updatedAt"]},"ExecutionDetail":{"allOf":[{"$ref":"#/components/schemas/Execution"},{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{}}},"errors":{"type":"array","items":{"type":"object","properties":{}}},"processing":{"type":"object","properties":{"state":{"type":"string","enum":["claimed","idle"]},"claimedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["state","claimedAt"]},"recovery":{"type":"object","properties":{}}},"required":["steps","errors","processing","recovery"]}]},"ExecutionRecord":{"type":"object","properties":{"id":{"type":"string","minLength":1},"executionId":{"type":"string"},"sourceRecordIdentifier":{"type":["string","null"]},"destinationRecordIdentifier":{"type":["string","null"]},"recordType":{"type":["string","null"]},"status":{"type":"string"},"attemptCount":{"type":"integer"},"completedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","executionId","sourceRecordIdentifier","destinationRecordIdentifier","recordType","status","attemptCount","completedAt","createdAt"]},"TraceRecordPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sourceRecordIdentifier":{"type":["string","null"]},"destinationRecordIdentifier":{"type":["string","null"]},"status":{"type":"string","enum":["moved","stopped","skipped","in_progress"]},"label":{"type":["string","null"],"description":"A short name for the record, from the source record."},"amount":{"type":["string","null"]},"changedByRule":{"type":"boolean"}},"required":["id","sourceRecordIdentifier","destinationRecordIdentifier","status","label","amount","changedByRule"]}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Records matching the search and filter."},"counts":{"type":"object","properties":{"all":{"type":"integer"},"stopped":{"type":"integer"},"rule":{"type":"integer"}},"required":["all","stopped","rule"]},"filter":{"type":"string","enum":["all","stopped","rule","skipped"]},"search":{"type":"string"},"kept":{"type":"boolean","description":"Whether step-by-step details are still kept for this run."},"retentionDays":{"type":"integer"},"healthData":{"type":"boolean"}},"required":["items","page","pageSize","total","counts","filter","search","kept","retentionDays","healthData"]},"TraceValue":{"type":"object","properties":{"text":{"type":"string","description":"The value as text; partly masked when `masked` is true."},"masked":{"type":"boolean"},"sensitivity":{"type":["string","null"],"enum":["email","phone","bank","card","government_id","address","birth_date","health"]}},"required":["text","masked","sensitivity"]},"TraceRecord":{"type":"object","properties":{"id":{"type":"string","minLength":1},"executionId":{"type":"string"},"status":{"type":"string","enum":["moved","stopped","skipped","in_progress"]},"kept":{"type":"boolean"},"truncated":{"type":"boolean","description":"A large value was cut short when it was saved."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"healthData":{"type":"boolean"},"revealed":{"type":"boolean"},"canReveal":{"type":"boolean"},"before":{"type":"object","properties":{"app":{"type":["object","null"],"properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"]},"recordId":{"type":["string","null"]},"title":{"type":["string","null"]},"link":{"type":["string","null"],"description":"Opens the record in the source app, when its connector can link to it."},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"label":{"type":"string"},"value":{"$ref":"#/components/schemas/TraceValue"}},"required":["field","label","value"]}}},"required":["app","recordId","title","link","fields"]},"did":{"type":"array","items":{"type":"object","properties":{"stepKey":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"app":{"type":["object","null"],"properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"]},"summary":{"type":"string"},"detail":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"rule":{"type":["string","null"]},"ruleId":{"type":["string","null"]}},"required":["field","rule","ruleId"]}}},"required":["stepKey","name","kind","status","app","summary","detail","rules"]}},"after":{"type":["object","null"],"properties":{"app":{"type":["object","null"],"properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"]},"status":{"type":"string"},"recordId":{"type":["string","null"]},"link":{"type":["string","null"]},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"label":{"type":"string"},"value":{"$ref":"#/components/schemas/TraceValue"}},"required":["field","label","value"]}}},"required":["app","status","recordId","link","fields"]},"fields":{"type":"object","properties":{"title":{"type":"string","enum":["written","would_have_written"]},"rows":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"label":{"type":"string"},"source":{"allOf":[{"$ref":"#/components/schemas/TraceValue"},{"type":["object","null"]}]},"target":{"allOf":[{"$ref":"#/components/schemas/TraceValue"},{"type":["object","null"]}]},"how":{"type":"string","enum":["copied","formatted","looked_up","calculated","your_value","default","list","set_by_app","added"]},"rule":{"type":["string","null"]},"ruleId":{"type":["string","null"]},"changed":{"type":"boolean"}},"required":["field","label","source","target","how","rule","ruleId","changed"]}},"changed":{"type":"integer"},"copied":{"type":"integer"}},"required":["title","rows","changed","copied"]},"stopped":{"type":["object","null"],"properties":{"stepName":{"type":["string","null"]},"message":{"type":["string","null"]},"why":{"type":"string"},"fix":{"type":"string"},"fixWhere":{"type":"string"},"waitingForApproval":{"type":"boolean"},"deadLetterId":{"type":["string","null"]},"canRetry":{"type":"boolean"}},"required":["stepName","message","why","fix","fixWhere","waitingForApproval","deadLetterId","canRetry"]},"hiddenValues":{"type":"integer","description":"How many values are masked in this answer."}},"required":["id","executionId","status","kept","truncated","expiresAt","healthData","revealed","canReveal","before","did","after","fields","stopped","hiddenValues"]},"RetryRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1},"executionId":{"type":"string"},"executionRecordId":{"type":["string","null"]},"status":{"type":"string"},"idempotencyKey":{"type":["string","null"]},"requestedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"processedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["id","executionId","executionRecordId","status","idempotencyKey","requestedAt","processedAt"]},"Schedule":{"type":"object","properties":{"id":{"type":"string","minLength":1},"flowId":{"type":"string"},"name":{"type":"string"},"cronExpression":{"type":"string"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"nextRunAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastExecutionId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","flowId","name","cronExpression","timezone","enabled","nextRunAt","lastExecutionId","createdAt","updatedAt"]},"FailedRecord":{"type":"object","properties":{"id":{"type":"string","minLength":1},"executionRecordId":{"type":"string"},"flowId":{"type":"string"},"status":{"type":"string","description":"`open`, `retry_scheduled`, `retry_failed`, `resolved` or `ignored`."},"retryCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"lastRetryAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"resolvedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"resolutionNote":{"type":["string","null"]}},"required":["id","executionRecordId","flowId","status","retryCount","createdAt","lastRetryAt","resolvedAt","resolutionNote"]},"LiveCheck":{"type":"object","properties":{"connectionId":{"type":"string"},"state":{"type":"string","enum":["not_checked","failed","credentials_changed","expired","passed"]},"current":{"type":"boolean"},"checkedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"summary":{"type":["string","null"]},"fixHint":{"type":["string","null"]}},"required":["connectionId","state","current","checkedAt","expiresAt","summary"]},"Connection":{"type":"object","properties":{"id":{"type":"string","minLength":1},"projectId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"status":{"type":"string"},"healthStatus":{"type":"string"},"authenticationType":{"type":["string","null"]},"providerBaseUrl":{"type":["string","null"]},"configuration":{"type":["object","null"],"properties":{},"description":"Non-secret settings for the connector. Never holds credentials."},"secretReference":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastRotatedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["id","status","expiresAt","lastRotatedAt"],"description":"Status of the stored credential. The credential itself is never returned."},"credentialExpiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastTestedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastSuccessAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastFailureAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"suspendedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"liveCheck":{"anyOf":[{"$ref":"#/components/schemas/LiveCheck"},{"type":"null"},{"type":"null"}]}},"required":["id","projectId","name","slug","environment","status","healthStatus","authenticationType","providerBaseUrl","configuration","secretReference","credentialExpiresAt","lastTestedAt","lastSuccessAt","lastFailureAt","suspendedAt","createdAt","updatedAt"]},"EndUserConnection":{"type":"object","properties":{"id":{"type":"string"},"connectorKey":{"type":"string"},"appName":{"type":"string"},"environment":{"type":"string"},"status":{"type":"string","enum":["connected","withdrawn"]},"healthStatus":{"type":"string"},"appConnectionId":{"type":["string","null"],"description":"Your workspace connection whose app the end user connected through."},"connectedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"withdrawnAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["id","connectorKey","appName","environment","status","healthStatus","appConnectionId","connectedAt","withdrawnAt"]},"EndUser":{"type":"object","properties":{"id":{"type":"string"},"externalUserId":{"type":["string","null"],"description":"Your id for the customer. Null after erasure."},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"projectId":{"type":["string","null"]},"status":{"type":"string","enum":["active","erased"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"erasedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"connections":{"type":"array","items":{"$ref":"#/components/schemas/EndUserConnection"}}},"required":["id","externalUserId","displayName","email","projectId","status","createdAt","erasedAt","connections"]},"EndUserConsent":{"type":"object","properties":{"id":{"type":"string"},"connectionId":{"type":["string","null"]},"connectorKey":{"type":"string"},"appName":{"type":"string"},"purpose":{"type":"string"},"purposeKey":{"type":["string","null"]},"permissions":{"type":"array","items":{"type":"string"}},"wordingVersion":{"type":"string","description":"Version of the consent wording the end user saw."},"status":{"type":"string","enum":["agreed","granted","revoked","declined"]},"agreedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"grantedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"revokedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"revokedBy":{"type":["string","null"],"description":"`end_user`, `workspace` or `erasure`."},"revocationReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","connectionId","connectorKey","appName","purpose","purposeKey","permissions","wordingVersion","status","agreedAt","grantedAt","revokedAt","revokedBy","revocationReason","createdAt"]},"EndUserDetail":{"allOf":[{"$ref":"#/components/schemas/EndUser"},{"type":"object","properties":{"consents":{"type":"array","items":{"$ref":"#/components/schemas/EndUserConsent"}},"links":{"type":"array","items":{"type":"object","properties":{}}},"dataRequests":{"type":"array","items":{"type":"object","properties":{}}},"runs":{"type":"array","items":{"type":"object","properties":{}}}},"required":["consents","links","dataRequests","runs"]}]},"DataSubjectRequest":{"type":"object","properties":{"id":{"type":"string"},"endUserId":{"type":"string"},"kind":{"type":"string","enum":["access","erasure"]},"status":{"type":"string","description":"`pending_approval`, `in_progress`, `completed`, `rejected` or `failed`."},"reason":{"type":["string","null"]},"requestedByType":{"type":"string"},"decidedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"completedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"evidence":{"type":["object","null"],"properties":{},"description":"What was done, as counts and hashes. Never personal data."},"evidenceHash":{"type":["string","null"]}},"required":["id","endUserId","kind","status","reason","requestedByType","decidedAt","completedAt","createdAt","evidence","evidenceHash"]},"Obligation":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string","description":"The contract or agreement reference."},"counterparty":{"type":"string"},"text":{"type":"string","description":"What is owed, in plain words."},"owner":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["member","team"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["kind","name"],"description":"A workspace member (by name) or a team. Never an email address."},"recurrence":{"type":"string","enum":["none","weekly","monthly","quarterly","yearly"]},"dueDate":{"type":"string","description":"The next due date (YYYY-MM-DD)."},"sourceClause":{"type":["string","null"]},"status":{"type":"string","enum":["open","due_soon","overdue","done","waived"],"description":"`due_soon` and `overdue` are worked out from the due date and the reminder lead time."},"reminderLeadDays":{"type":"integer"},"evidenceLinks":{"type":"array","items":{"type":"string"}},"lastCompletedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"completedCount":{"type":"integer"},"waivedReason":{"type":["string","null"]},"kind":{"type":"string","enum":["obligation","return","filing"],"description":"A return or filing is filed with a regulator by a person. It closes only with proof (`markObligationFiled`)."},"regulator":{"type":["string","null"]},"period":{"type":["string","null"],"description":"The period it covers, for example `Q3 2026`."},"periodStart":{"type":["string","null"]},"periodEnd":{"type":["string","null"]},"checker":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The member who approves a return's file. Never the person who prepared it."},"filing":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["preparing","ready_for_approval","approved","filed","overdue"]},"stage":{"type":"string","enum":["preparing","ready_for_approval","approved","filed"]},"fileName":{"type":["string","null"]},"checks":{"type":["object","null"],"properties":{"passed":{"type":"integer"},"total":{"type":"integer"}},"required":["passed","total"]},"filedOn":{"type":["string","null"]},"filedByName":{"type":["string","null"]},"filingReference":{"type":["string","null"]},"hasProof":{"type":"boolean"}},"required":["status","stage","fileName","checks","filedOn","filedByName","filingReference","hasProof"],"description":"Where a return stands. Null for other obligations."},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","reference","counterparty","text","owner","recurrence","dueDate","sourceClause","status","reminderLeadDays","evidenceLinks","lastCompletedAt","completedCount","waivedReason","kind","regulator","period","periodStart","periodEnd","checker","filing","source","createdAt","updatedAt"]},"ObligationFiling":{"type":"object","properties":{"obligation":{"$ref":"#/components/schemas/Obligation"},"copy":{"type":"string"},"filing":{"type":"object","properties":{"stage":{"type":"string","enum":["preparing","ready_for_approval","approved","filed"]},"file":{"type":["object","null"],"properties":{}},"figures":{"type":["object","null"],"properties":{}},"checks":{"type":["object","null"],"properties":{"method":{"type":"string","description":"Always `Calculated by Nexra · no AI`."},"calculatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"detail":{"type":"string"},"status":{"type":"string","enum":["pass","fail","needs_note","not_checked"]},"lineKey":{"type":"string"}},"required":["key","label","detail","status"]}},"passed":{"type":"integer"},"total":{"type":"integer"},"blocking":{"type":"boolean"}},"required":["method","calculatedAt","items","passed","total","blocking"]},"notes":{"type":"object","additionalProperties":{"type":"string"}},"preparedBy":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"preparedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"review":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"canDecide":{"type":"boolean"}},"required":["id","status","canDecide"]},"decidedBy":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"decidedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"decisionNote":{"type":["string","null"]},"proof":{"type":["object","null"],"properties":{}},"next":{"type":["object","null"],"properties":{}},"can":{"type":"object","properties":{"prepare":{"type":"boolean"},"send":{"type":"boolean"},"markFiled":{"type":"boolean"}},"required":["prepare","send","markFiled"]}},"required":["stage","file","figures","checks","notes","preparedBy","preparedAt","review","decidedBy","decidedAt","decisionNote","proof","next","can"]}},"required":["obligation","copy","filing"]},"AssetCustomer":{"type":"object","properties":{"id":{"type":"string"},"assetKey":{"type":"string"},"assetName":{"type":["string","null"]},"customerName":{"type":"string"},"crmId":{"type":["string","null"]},"externalId":{"type":["string","null"]},"source":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","assetKey","assetName","customerName","crmId","externalId","source","updatedAt"]},"EvidenceMatrix":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["pending_review","reviewed","returned"]},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]}},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"cells":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["evidenced","not_evidenced"],"description":"`not_evidenced` means only that the supplied information did not show it. It is never a rejection."},"quote":{"type":["string","null"]},"source":{"type":["string","null"]}},"required":["status","quote","source"]}}},"required":["key","label","cells"]}},"questions":{"type":"array","items":{"type":"object","properties":{"rowKey":{"type":["string","null"]},"question":{"type":"string"}},"required":["rowKey","question"]}},"review":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"canDecide":{"type":"boolean"}},"required":["id","status","canDecide"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","title","subject","status","criteria","rows","questions","review","createdAt"]},"Statement":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"customerName":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"status":{"type":"string","enum":["pending_approval","approved","rejected"]},"html":{"type":"string","description":"The statement as a printable HTML page."},"review":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"canDecide":{"type":"boolean"}},"required":["id","status","canDecide"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","title","template","customerName","periodStart","periodEnd","status","html","review","createdAt"]},"Trigger":{"type":"object","properties":{"triggerId":{"type":"string"},"flowId":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"url":{"type":"string","description":"Where senders post events: `/api/connect/triggers/{publicId}`."},"secretLast4":{"type":["string","null"]},"secretRotatedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"previousSecretValidUntil":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"maxBodyBytes":{"type":"integer"},"maxDeliveriesPerMinute":{"type":"integer"},"timestampToleranceSeconds":{"type":"integer"},"inputRetentionDays":{"type":"integer"},"verification":{"type":"string"},"lastDeliveryAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"disabledAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["triggerId","flowId","kind","name","status","environment","url","secretLast4","secretRotatedAt","previousSecretValidUntil","maxBodyBytes","maxDeliveriesPerMinute","timestampToleranceSeconds","inputRetentionDays","verification","lastDeliveryAt","disabledAt","createdAt"]},"TriggerWithSecret":{"allOf":[{"$ref":"#/components/schemas/Trigger"},{"type":"object","properties":{"secret":{"type":"string","description":"The signing secret (`nxwhsec_...`). Shown once, only when Nexra made it. Store it safely."},"secretShownOnce":{"type":"boolean"}},"required":["secretShownOnce"]}]},"TriggerDelivery":{"type":"object","properties":{"deliveryId":{"type":"string"},"receivedAt":{"type":"string"},"status":{"type":"string"},"reasonCode":{"type":["string","null"]},"httpStatus":{"type":["integer","null"]},"eventId":{"type":["string","null"]},"eventType":{"type":["string","null"]},"payloadSha256":{"type":["string","null"]},"sizeBytes":{"type":["integer","null"]},"recordCount":{"type":["integer","null"]},"executionId":{"type":["string","null"]}},"required":["deliveryId","receivedAt","status","reasonCode","httpStatus","eventId","eventType","payloadSha256","sizeBytes","recordCount","executionId"]},"PollTrigger":{"type":"object","properties":{"pollTriggerId":{"type":"string"},"flowId":{"type":"string"},"kind":{"type":"string","enum":["poll"]},"name":{"type":"string"},"connectionId":{"type":"string"},"operationKey":{"type":"string"},"intervalMinutes":{"type":"integer"},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"status":{"type":"string"},"state":{"type":"string"},"stateMessage":{"type":["string","null"]},"lastCheckedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"nextCheckAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["pollTriggerId","flowId","kind","name","connectionId","operationKey","intervalMinutes","environment","status","state","stateMessage","lastCheckedAt","nextCheckAt"]},"FlowInput":{"type":"object","properties":{"inputId":{"type":"string"},"flowId":{"type":"string"},"format":{"type":"string"},"fileName":{"type":["string","null"]},"sizeBytes":{"type":"integer"},"sha256":{"type":"string"},"recordCount":{"type":"integer"},"executionId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["inputId","flowId","format","fileName","sizeBytes","sha256","recordCount","executionId","createdAt","expiresAt"]},"TriggerDeliveryResult":{"type":"object","properties":{"accepted":{"type":"boolean"},"deliveryId":{"type":"string"},"executionId":{"type":["string","null"]},"payloadSha256":{"type":"string"},"duplicate":{"type":"boolean"},"code":{"type":"string"}},"required":["accepted"]},"Reconciliation":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":["string","null"]},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"status":{"type":"string"},"schedule":{"type":["object","null"],"properties":{}},"lookbackDays":{"type":"integer"},"health":{"type":["string","null"]},"openItemCount":{"type":"integer"},"lastRunId":{"type":["string","null"]},"lastRunAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastRunStatus":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","name","description","environment","status","schedule","lookbackDays","health","openItemCount","lastRunId","lastRunAt","lastRunStatus","createdAt","updatedAt"]},"ReconciliationRun":{"type":"object","properties":{"id":{"type":"string","minLength":1},"reconciliationId":{"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"},"startedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"completedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"sourceCount":{"type":"integer"},"targetCount":{"type":"integer"},"matchedCount":{"type":"integer"},"varianceCount":{"type":"integer"},"unmatchedSourceCount":{"type":"integer"},"unmatchedTargetCount":{"type":"integer"},"message":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","reconciliationId","status","trigger","startedAt","completedAt","sourceCount","targetCount","matchedCount","varianceCount","unmatchedSourceCount","unmatchedTargetCount","message","createdAt"]},"ReconciliationReviewItem":{"type":"object","properties":{"id":{"type":"string","minLength":1},"reconciliationId":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"reason":{"type":["string","null"]},"suggestedFix":{"type":["string","null"]},"amount":{"type":["number","null"]},"difference":{"type":["number","null"]},"currency":{"type":["string","null"]},"sourceExternalIds":{"type":"array","items":{"type":"string"}},"targetExternalIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","reconciliationId","kind","status","reason","suggestedFix","amount","difference","currency","sourceExternalIds","targetExternalIds","createdAt","updatedAt"]},"PensionCase":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["onboarding","retirement","withdrawal_25","death_benefit"]},"reference":{"type":"string","description":"Your own case reference. Never an RSA PIN or NIN."},"member":{"type":["string","null"],"description":"The member by the last four characters of the RSA PIN."},"status":{"type":"string","enum":["in_review","approved","returned","closed"]},"nextStep":{"type":"string"},"evidenceMatrixId":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"fileName":{"type":"string"},"sha256":{"type":"string"},"sizeBytes":{"type":["integer","null"]},"capturedAt":{"type":"string"}},"required":["item","fileName","sha256","sizeBytes","capturedAt"]}},"obligations":{"type":"array","items":{"type":"object","properties":{}}},"sealedAt":{"type":["string","null"]},"sealHash":{"type":["string","null"]}},"required":["id","kind","reference","member","status","nextStep","evidenceMatrixId","documents","obligations","sealedAt","sealHash"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"url":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"mode":{"type":"string","enum":["test","live"]},"healthStatus":{"type":"string"},"consecutiveFailures":{"type":"integer"},"lastSuccessAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"lastFailureAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"secretPrefix":{"type":"string"},"secretLast4":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","name","url","status","mode","healthStatus","consecutiveFailures","lastSuccessAt","lastFailureAt","secretPrefix","secretLast4","eventTypes","createdAt","updatedAt"]},"WebhookEndpointWithSecret":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string","description":"The signing secret. Shown once; store it safely."},"revealPolicy":{"type":"string"}},"required":["endpoint","secret","revealPolicy"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","minLength":1},"endpointId":{"type":"string"},"eventId":{"type":"string"},"eventType":{"type":"string"},"eventLabel":{"type":"string"},"mode":{"type":"string","enum":["test","live"]},"status":{"type":"string"},"statusLabel":{"type":"string"},"canResend":{"type":"boolean"},"attempt":{"type":"integer"},"maxAttempts":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"completedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"statusCode":{"type":["integer","null"]},"attempts":{"type":"array","items":{"type":"object","properties":{}}}},"required":["id","endpointId","eventId","eventType","eventLabel","mode","status","statusLabel","canResend","attempt","maxAttempts","nextAttemptAt","completedAt","statusCode","attempts"]},"Approval":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string"},"resourceType":{"type":"string","description":"`connector_action`, `mcp_tool` or `credential_action`."},"resourceId":{"type":["string","null"]},"environment":{"type":["string","null"]},"status":{"type":"string","description":"`pending`, `approved`, `rejected`, `expired`, `cancelled`, `executing`, `succeeded` or `failed`."},"requiredApprovals":{"type":"integer"},"requiredApproverRole":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["id","action","resourceType","resourceId","environment","status","requiredApprovals","requiredApproverRole","expiresAt","createdAt","updatedAt"]},"GovernedApproval":{"type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string"},"requestedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"action":{"type":"object","properties":{}},"binding":{"type":"object","properties":{"digest":{"type":"string"},"shortDigest":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["digest","shortDigest","expiresAt"],"description":"Send `digest` back as `reviewedDigest` when you decide."},"canDecide":{"type":"boolean"}},"required":["id","status","requestedAt","expiresAt","action","binding","canDecide"]},"GovernedApprovalPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GovernedApproval"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page. `null` on the last page."}},"required":["items","nextCursor"]},"EvidenceEntry":{"type":"object","properties":{"sequence":{"type":"integer"},"at":{"type":"string"},"actionId":{"type":["string","null"]},"eventType":{"type":"string"},"decision":{"type":["string","null"]},"outcome":{"type":["string","null"]},"previousHash":{"type":["string","null"]}},"required":["sequence","at","actionId","eventType","decision","outcome","previousHash"]},"EvidencePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceEntry"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page. `null` on the last page."}},"required":["items","nextCursor"]},"PolicyPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{}}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page. `null` on the last page."}},"required":["items","nextCursor"]},"PrincipalPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["type","id","name","status"]}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page. `null` on the last page."}},"required":["items","nextCursor"]},"GrantPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{}}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page. `null` on the last page."}},"required":["items","nextCursor"]},"CompanyReadReceipt":{"type":"object","properties":{"ref":{"type":"string"},"connectionId":{"type":"string"},"system":{"type":"string"},"operation":{"type":"string"},"label":{"type":"string"},"recordCount":{"type":"integer"},"truncated":{"type":"boolean"},"status":{"type":"string","enum":["ok","refused","failed"]},"reason":{"type":"string"},"retrievedAt":{"type":"string"}},"required":["ref","connectionId","system","operation","label","recordCount","truncated","status","retrievedAt"],"description":"What one read did. Never the records themselves."},"CompanyAnswer":{"type":"object","properties":{"id":{"type":"string","description":"The read access log entry. Pass it as `followUpOf` to ask a follow-up."},"question":{"type":"string"},"origin":{"type":"string","enum":["api"]},"group":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"showSources":{"type":"boolean"}},"required":["id","name","showSources"]},"status":{"type":"string","enum":["answered","partial","refused","failed"]},"answer":{"type":"object","properties":{"headline":{"type":["object","null"],"properties":{"text":{"type":"string"},"refs":{"type":"array","items":{"type":"string"},"description":"Citations: R1 is a read, C1 a calculation Nexra did in code."}},"required":["text","refs"]},"sentences":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"refs":{"type":"array","items":{"type":"string"},"description":"Citations: R1 is a read, C1 a calculation Nexra did in code."}},"required":["text","refs"]}},"figures":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"refs":{"type":"array","items":{"type":"string"}},"calculated":{"type":"boolean"}},"required":["label","value","refs","calculated"]}},"table":{"type":["object","null"],"properties":{"title":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"refs":{"type":"array","items":{"type":"string"},"description":"Citations: R1 is a read, C1 a calculation Nexra did in code."}},"required":["text","refs"]}}}},"required":["title","columns","rows"]},"sources":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"system":{"type":"string"},"label":{"type":"string"},"recordCount":{"type":"integer"},"retrievedAt":{"type":"string"},"truncated":{"type":"boolean"}},"required":["ref","system","label","recordCount","retrievedAt","truncated"]},"description":"Empty when the group hides its source list; the citations are checked either way."},"calculations":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"label":{"type":"string"},"formula":{"type":"string"},"worked":{"type":"string"},"inputRefs":{"type":"array","items":{"type":"string"}}},"required":["ref","label","formula","worked","inputRefs"]}},"removed":{"type":"integer","description":"Statements left out because no read supported a number in them."},"gaps":{"type":"array","items":{"type":"string"}}},"required":["headline","sentences","figures","table","sources","calculations","removed","gaps"]},"reads":{"type":"array","items":{"$ref":"#/components/schemas/CompanyReadReceipt"}},"summary":{"type":"string"},"text":{"type":"string","description":"The answer as plain text with its citations, ready to show in a chat."},"durationMs":{"type":"integer"},"readOnly":{"type":"boolean","enum":[true]},"logged":{"type":"boolean","enum":[true]}},"required":["id","question","origin","group","status","answer","reads","summary","text","durationMs","readOnly","logged"]},"LeadershipSummary":{"type":"object","properties":{"visible":{"type":"boolean","enum":[true]},"group":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"members":{"type":"array","items":{"type":"string"}},"setBy":{"type":["string","null"]}},"required":["id","name","members","setBy"]},"attendance":{"type":"object","properties":{"status":{"type":"string","enum":["ok","not_chosen","unavailable","failed"]},"basis":{"type":["string","null"],"enum":["clock_ins","active_minus_leave","sign_ins","own_system"]},"basisLabel":{"type":["string","null"],"description":"What \"in today\" means for the source the business chose, for example \"In today = clocked in on SeamlessHR today\"."},"note":{"type":["string","null"]},"headcount":{"type":["integer","null"]},"inToday":{"type":["integer","null"]},"onLeave":{"type":["integer","null"]},"presentRate":{"type":["integer","null"]},"teams":{"type":"array","items":{"type":"object","properties":{"team":{"type":"string"},"inToday":{"type":"integer"},"total":{"type":["integer","null"]}},"required":["team","inToday","total"]},"description":"Counts only. Names are never returned here."},"source":{"type":["object","null"],"properties":{"kind":{"type":"string"},"system":{"type":["string","null"]},"chosenBy":{"type":["string","null"]},"chosenAt":{"type":"string"}},"required":["kind","system","chosenBy","chosenAt"]}},"required":["status","basis","basisLabel","note","headcount","inToday","onLeave","presentRate","teams","source"]},"cash":{"type":["object","null"],"properties":{}},"moneyMoved":{"type":"object","properties":{}},"calculatedAt":{"type":"string"},"readOnly":{"type":"boolean","enum":[true]},"logged":{"type":"boolean","enum":[true]},"namesIncluded":{"type":"boolean","enum":[false]}},"required":["visible","group","attendance","cash","moneyMoved","calculatedAt","readOnly","logged","namesIncluded"]},"PublicConnector":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"vendor":{"type":["string","null"]},"category":{"type":"string"},"categoryLabel":{"type":"string"},"summary":{"type":"string"},"status":{"type":"string"},"implemented":{"type":"boolean"},"authentication":{},"documentationUrl":{"type":["string","null"]},"limitations":{"type":"array","items":{"type":"string"}},"operations":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"entity":{"type":["string","null"]},"mode":{"type":"string"},"approvalRequired":{"type":"boolean"}},"required":["key","label","description","entity","mode","approvalRequired"]}}},"required":["key","name","vendor","category","categoryLabel","summary","status","implemented","documentationUrl","limitations","operations"]},"StatusUptime":{"type":"object","properties":{"generatedAt":{"type":"string"},"windowDays":{"type":"integer"},"daysMeasured":{"type":"integer"},"measuredFrom":{"type":["string","null"]},"uptimePercent":{"type":["number","null"]},"method":{"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"uptimePercent":{"type":["number","null"]},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"checks":{"type":"integer"},"failures":{"type":"integer"},"uptimePercent":{"type":"number"},"status":{"type":"string","enum":["operational","degraded","outage"]}},"required":["date","checks","failures","uptimePercent","status"]}}},"required":["slug","name","uptimePercent","days"]}},"outages":{"type":"array","items":{"type":"object","properties":{}}},"incidents":{"type":"array","items":{"type":"object","properties":{}}}},"required":["generatedAt","windowDays","daysMeasured","measuredFrom","uptimePercent","method","targets","outages","incidents"]},"JsonRpcResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"},{"type":"null"}]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"]}},"required":["jsonrpc","id"]},"JsonRpcRequest":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"method":{"type":"string","example":"tools/list"},"params":{"type":"object","properties":{}}},"required":["jsonrpc","method"]},"ProtectedResourceMetadata":{"type":"object","properties":{"resource":{"type":"string"},"authorization_servers":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"bearer_methods_supported":{"type":"array","items":{"type":"string"}}},"required":["resource"]},"ResearchPlan":{"type":"object","properties":{"restated":{"type":"string"},"kind":{"type":"string","enum":["brief","compare"]},"depth":{"type":"string","enum":["standard","deep"]},"subjects":{"type":"array","items":{"type":"object","properties":{}}},"reads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceClass":{"type":"string","enum":["public","personal"]},"operation":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"reason":{"type":"string"}},"required":["id","source","sourceClass","operation","label","enabled"]}},"estimate":{"type":"object","properties":{"reads":{"type":"integer"},"steps":{"type":"integer"},"modelCalls":{"type":"integer"},"seconds":{"type":"integer"},"summary":{"type":"string"}},"required":["reads","steps","modelCalls","seconds","summary"]},"warnings":{"type":"array","items":{"type":"string"}},"promises":{"type":"array","items":{"type":"string"}}},"required":["restated","kind","depth","subjects","reads","estimate","warnings","promises"]},"ResearchBrief":{"type":["object","null"],"properties":{"title":{"type":"string"},"generatedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"inShort":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Ends with its citations, for example `[F3][C1]`."},"refs":{"type":"array","items":{"type":"string"}}},"required":["text","refs"]}},"evidence":{"type":"object","properties":{"sentences":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Ends with its citations, for example `[F3][C1]`."},"refs":{"type":"array","items":{"type":"string"}}},"required":["text","refs"]}},"table":{"type":"array","items":{"type":"object","properties":{"subject":{"type":"string"},"metric":{"type":"string"},"label":{"type":"string"},"cells":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"value":{"type":"string"},"ref":{"type":["string","null"]}},"required":["period","value","ref"]}}},"required":["subject","metric","label","cells"]}}},"required":["sentences","table"]},"calculations":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"label":{"type":"string"},"formula":{"type":"string"},"worked":{"type":"string"},"inputRefs":{"type":"array","items":{"type":"string"}}},"required":["ref","label","formula","worked","inputRefs"]}},"assumptions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Ends with its citations, for example `[F3][C1]`."},"refs":{"type":"array","items":{"type":"string"}}},"required":["text","refs"]},"description":"Shown as \"Please confirm\"."},"gaps":{"type":"array","items":{"type":"string"},"description":"What isn't in the connected sources."},"removed":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"reason":{"type":"string","enum":["unsupported_number","wrong_citation","unknown_citation","ranking_language"]},"detail":{"type":"string"},"block":{"type":"string"}},"required":["text","reason","detail","block"]}},"removedNote":{"type":["string","null"],"description":"\"1 sentence left out because no source supported it\"."},"comparison":{"type":["object","null"],"properties":{"title":{"type":"string"},"subject":{"type":"string"},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]}},"rows":{"type":"array","items":{"type":"object","properties":{}}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","subject","criteria","rows","notes"],"description":"For comparisons: an evidence matrix (rows are subjects, columns are metrics). Never a score or a rank."},"sources":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","description":"The citable id: `F3` for a fact, `C1` for a calculation."},"label":{"type":"string"},"sourceKey":{"type":"string","description":"`sec-edgar`, `companies-house`, `gdelt`, `world-bank`, `microsoft-365` or `google-drive`."},"sourceClass":{"type":"string","enum":["public","personal"]},"url":{"type":["string","null"]},"retrievedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"locator":{"type":"string","description":"Where in the record the value is: concept, filing, accession, period or quote."},"quote":{"type":["string","null"]},"licenceNote":{"type":["string","null"]}},"required":["ref","label","sourceKey","sourceClass","url","retrievedAt","locator","quote","licenceNote"]}},"attributions":{"type":"array","items":{"type":"string"}}},"required":["title","generatedAt","inShort","evidence","calculations","assumptions","gaps","removed","removedNote","comparison","sources","attributions"],"description":"The validated brief, once the run has finished."},"ResearchRun":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"kind":{"type":"string","enum":["brief","compare"]},"depth":{"type":"string","enum":["standard","deep"]},"status":{"type":"string","enum":["planned","approved","running","validating","completed","partial","failed","cancelled"]},"statusMessage":{"type":["string","null"]},"surface":{"type":"string","enum":["console","mcp"]},"plan":{"$ref":"#/components/schemas/ResearchPlan"},"progress":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"state":{"type":"string"},"done":{"type":"integer"},"total":{"type":"integer"}},"required":["key","label","state","done","total"]}},"readCount":{"type":"integer"},"stepsEstimated":{"type":"integer","description":"25 for a standard brief, 100 for a deep one."},"stepsCharged":{"type":"integer"},"stopRequested":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"startedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"completedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"output":{"$ref":"#/components/schemas/ResearchBrief"},"openUrl":{"type":["string","null"]},"saveUrl":{"type":["string","null"],"description":"Opens the brief in Nexra to save it (the person approves there)."}},"required":["id","question","kind","depth","status","statusMessage","surface","plan","progress","readCount","stepsEstimated","stepsCharged","stopRequested","createdAt","startedAt","completedAt","expiresAt","openUrl","saveUrl"]},"ResearchSourcePolicy":{"type":"object","properties":{"version":{"type":"integer"},"allowedPublicSources":{"type":"array","items":{"type":"string"}},"allowedConnectionIds":{"type":"array","items":{"type":"string"}},"maxReadsPerRun":{"type":"integer"},"retentionDays":{"type":"integer"},"publicSources":{"type":"array","items":{"type":"object","properties":{}}},"connections":{"type":"array","items":{"type":"object","properties":{}}}},"required":["version","allowedPublicSources","allowedConnectionIds","maxReadsPerRun","retentionDays","publicSources","connections"]}},"parameters":{}},"paths":{"/api/console/connect/integrations":{"get":{"operationId":"listIntegrations","tags":["Integrations"],"summary":"List integrations","description":"Integrations in the workspace, most recently changed first, with their flows and lifecycle. Archived and deleted ones are left out.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createIntegration","tags":["Integrations"],"summary":"Create an integration","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":120},"projectId":{"type":"string","description":"A project in this workspace."},"slug":{"type":"string","description":"Defaults to a slug of the name. Must be unique."},"description":{"type":"string"},"businessOwnerUserId":{"type":["string","null"],"description":"Workspace member who owns the business outcome. Send `null` to clear."},"technicalOwnerUserId":{"type":["string","null"]}},"required":["name","projectId"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}":{"get":{"operationId":"getIntegration","tags":["Integrations"],"summary":"Get an integration","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"operationId":"updateIntegration","tags":["Integrations"],"summary":"Update an integration","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":120},"description":{"type":"string","maxLength":1000,"description":"An empty string clears it."},"ownerUserId":{"type":["string","null"],"description":"Same as `businessOwnerUserId`."},"businessOwnerUserId":{"type":["string","null"],"description":"Workspace member who owns the business outcome. Send `null` to clear."},"technicalOwnerUserId":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"deleteIntegration","tags":["Lifecycle"],"summary":"Delete an integration","description":"Moves the integration to Recently deleted. It can be restored until `purgeAfter`.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmation":{"type":"string","description":"The item's name, typed to confirm. Required when the item has live flows."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedItem"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/archive":{"post":{"operationId":"archiveIntegration","tags":["Integrations"],"summary":"Archive an integration","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/export":{"get":{"operationId":"exportIntegration","tags":["Integrations"],"summary":"Export an integration","description":"A description of the integration for use from other tools: its flows, operations, mappings and how to call it through MCP. It never contains credentials.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{},"description":"The export: `format`, `integrationId`, `name`, `flows`, `mcp`, `invoke` and `monitor`."}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/flows":{"post":{"operationId":"createFlow","tags":["Flows"],"summary":"Create a flow","description":"Creates a flow with a first draft version.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3},"triggerType":{"type":"string","enum":["manual","schedule"]},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"slug":{"type":"string"},"description":{"type":"string"},"versionLabel":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/lifecycle/permissions":{"get":{"operationId":"getLifecyclePermissions","tags":["Lifecycle"],"summary":"What your role can do","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"pause":{"type":"boolean"},"suspend":{"type":"boolean"},"delete":{"type":"boolean"},"restore":{"type":"boolean"},"edit":{"type":"boolean"},"role":{"type":"string"}},"required":["pause","suspend","delete","restore","edit","role"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/recently-deleted":{"get":{"operationId":"listRecentlyDeleted","tags":["Lifecycle"],"summary":"List recently deleted items","description":"Integrations and flows deleted within the retention period, which can still be restored.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"retentionDays":{"type":"integer"},"canRestore":{"type":"boolean"},"integrations":{"type":"array","items":{"type":"object","properties":{}}},"flows":{"type":"array","items":{"type":"object","properties":{}}}},"required":["retentionDays","canRestore","integrations","flows"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/pause":{"post":{"operationId":"pauseIntegration","tags":["Lifecycle"],"summary":"Pause an integration","description":"Stops new runs of every flow in the integration until it is resumed.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/resume":{"post":{"operationId":"resumeIntegration","tags":["Lifecycle"],"summary":"Resume an integration","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/suspend":{"post":{"operationId":"suspendIntegration","tags":["Lifecycle"],"summary":"Suspend an integration","description":"A stronger stop than pausing, for incidents. Lifting it needs the integration's name typed to confirm.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":500,"description":"Why it is suspended. Kept in the audit trail."}},"required":["reason"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/lift-suspension":{"post":{"operationId":"liftIntegrationSuspension","tags":["Lifecycle"],"summary":"Lift an integration's suspension","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmation":{"type":"string","description":"The item's name, typed to confirm."}},"required":["confirmation"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/integrations/{integrationId}/restore":{"post":{"operationId":"restoreIntegration","tags":["Lifecycle"],"summary":"Restore a deleted integration","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The integration id."},"required":true,"name":"integrationId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/pause":{"post":{"operationId":"pauseFlow","tags":["Lifecycle"],"summary":"Pause a flow","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/resume":{"post":{"operationId":"resumeFlow","tags":["Lifecycle"],"summary":"Resume a flow","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}":{"delete":{"operationId":"deleteFlow","tags":["Lifecycle"],"summary":"Delete a flow","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmation":{"type":"string","description":"The item's name, typed to confirm. Required when the item has live flows."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedItem"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"get":{"operationId":"getFlow","tags":["Flows"],"summary":"Get a flow","description":"The flow with its versions, schedules, lifecycle and read progress.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"operationId":"updateFlow","tags":["Flows"],"summary":"Update a flow","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":120},"description":{"type":"string","maxLength":1000},"ownerUserId":{"type":["string","null"],"description":"A workspace member. Send `null` to clear."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/restore":{"post":{"operationId":"restoreFlow","tags":["Lifecycle"],"summary":"Restore a deleted flow","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/lifecycle":{"get":{"operationId":"getConnectionLifecycle","tags":["Lifecycle"],"summary":"Get a connection's suspension state","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionLifecycle"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/suspend":{"post":{"operationId":"suspendConnection","tags":["Lifecycle"],"summary":"Suspend a connection","description":"Stops every flow from using this connection until the suspension is lifted.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":500,"description":"Why it is suspended. Kept in the audit trail."}},"required":["reason"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionLifecycle"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/lift-suspension":{"post":{"operationId":"liftConnectionSuspension","tags":["Lifecycle"],"summary":"Lift a connection's suspension","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmation":{"type":"string","description":"The item's name, typed to confirm."}},"required":["confirmation"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionLifecycle"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/versions":{"get":{"operationId":"listFlowVersions","tags":["Flows"],"summary":"List a flow's versions","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersion"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createFlowVersion","tags":["Flows"],"summary":"Create a flow version","description":"A new draft version, optionally copied from an existing one.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"fromVersionId":{"type":"string","description":"Copy this version's steps and mappings."},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"triggerType":{"type":"string","enum":["manual","schedule"]},"versionLabel":{"type":"string"}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersion"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/versions/{versionId}":{"get":{"operationId":"getFlowVersion","tags":["Flows"],"summary":"Get a flow version","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The version id."},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersion"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/validate":{"post":{"operationId":"validateFlow","tags":["Flows"],"summary":"Check a flow version","description":"Checks the version can run and lists any problems. Defaults to the latest version.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"checksum":{"type":["string","null"]},"issues":{"type":"array","items":{"type":"object","properties":{}}}},"required":["valid","checksum","issues"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/publish":{"post":{"operationId":"publishFlow","tags":["Flows"],"summary":"Publish a flow version","description":"Makes the version the one runs use. Answers 400 with `issues` when the version has problems.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"versionId":{"type":"string"},"checksum":{"type":"string"},"status":{"type":"string","enum":["published"]}},"required":["flowId","versionId","checksum","status"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/versions/{versionId}/definition":{"get":{"operationId":"getFlowDefinition","tags":["Flows"],"summary":"Get a flow definition","description":"The whole flow as one JSON definition: trigger, steps, connections and mappings.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The version id."},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"versionId":{"type":"string"},"status":{"type":"string"},"editable":{"type":"boolean"},"builtWith":{"type":"string"},"definition":{"type":["object","null"],"properties":{}},"validationStatus":{"type":["string","null"]},"issues":{"type":"array","items":{"type":"object","properties":{}}}},"required":["flowId","versionId","status","editable","builtWith","definition","validationStatus","issues"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"put":{"operationId":"saveFlowDefinition","tags":["Flows"],"summary":"Save a flow definition","description":"Replaces a draft version's definition. Published versions cannot change; create a new version instead.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The version id."},"required":true,"name":"versionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"type":"object","properties":{},"description":"A flow definition. `trigger.kind` is `manual`, `schedule` or `webhook`."}},"required":["definition"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"versionId":{"type":"string"},"saved":{"type":"boolean","enum":[true]},"validation":{"type":"object","properties":{}}},"required":["flowId","versionId","saved","validation"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/versions/{versionId}/definition/validate":{"post":{"operationId":"validateFlowDefinition","tags":["Flows"],"summary":"Check a flow definition without saving","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The version id."},"required":true,"name":"versionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"type":"object","properties":{},"description":"A flow definition."}},"required":["definition"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{}}}},"required":["valid","issues"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/versions/{versionId}/go-live":{"get":{"operationId":"getGoLiveReadiness","tags":["Flows"],"summary":"Check go-live readiness","description":"Whether the version can go live, what blocks it and who needs to approve.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The version id."},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"versionId":{"type":"string"},"published":{"type":"boolean"},"canGoLive":{"type":"boolean"},"blockers":{"type":"array","items":{}},"approval":{"type":"object","properties":{}},"request":{"type":["object","null"],"properties":{}},"live":{"type":["object","null"],"properties":{}}},"required":["flowId","versionId","published","canGoLive","blockers","approval","request","live"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/versions/{versionId}/promote":{"post":{"operationId":"requestGoLive","tags":["Flows"],"summary":"Request go-live","description":"Copies a tested version to live and asks for approval where the workspace needs it. Answers 409 with a `code` when the version is not ready, for example `sandbox_test_required`.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The version id."},"required":true,"name":"versionId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"environmentId":{"type":"string"},"runMode":{"type":"string","enum":["always_on","supervised"],"description":"How the flow runs once Live. Applied when the go-live is activated."}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"sourceVersionId":{"type":"string"},"productionVersionId":{"type":"string"},"revision":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"revisionNumber":{"type":"integer"}},"required":["id","status","revisionNumber"]},"approval":{"type":"object","properties":{}}},"required":["flowId","sourceVersionId","productionVersionId","revision","approval"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/run-mode":{"get":{"operationId":"getFlowRunMode","tags":["Flows"],"summary":"Get how a flow runs","description":"Test or Live, and once Live: `always_on` (runs unattended within the workspace's rules) or `supervised` (every Live write waits for a person's approval). Includes clean Live runs in a row and, for a Supervised flow, a suggestion to move to Always on (never applied automatically).","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"target":{"type":"string","enum":["test","live"]},"runMode":{"type":"string","enum":["always_on","supervised"]},"runModeChosen":{"type":"boolean"},"changedAt":{"type":["string","null"]},"liveSince":{"type":["string","null"]},"cleanRuns":{"type":"integer"},"suggestion":{"type":["object","null"],"properties":{}},"resumable":{"type":["object","null"],"properties":{}},"pendingGoLive":{"type":["object","null"],"properties":{}},"can":{"type":"object","properties":{"changeRunMode":{"type":"boolean"},"switchToTest":{"type":"boolean"},"takeLive":{"type":"boolean"}},"required":["changeRunMode","switchToTest","takeLive"]}},"required":["flowId","target","runMode","runModeChosen","changedAt","liveSince","cleanRuns","suggestion","resumable","pendingGoLive","can"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"put":{"operationId":"setFlowRunMode","tags":["Flows"],"summary":"Change how a flow runs","description":"Workspace owners and admins only. Recorded in the audit log.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runMode":{"type":"string","enum":["always_on","supervised"]},"reason":{"type":"string","maxLength":500}},"required":["runMode"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"target":{"type":"string","enum":["test","live"]},"runMode":{"type":"string","enum":["always_on","supervised"]},"runModeChosen":{"type":"boolean"},"changedAt":{"type":["string","null"]},"liveSince":{"type":["string","null"]},"cleanRuns":{"type":"integer"},"suggestion":{"type":["object","null"],"properties":{}},"resumable":{"type":["object","null"],"properties":{}},"pendingGoLive":{"type":["object","null"],"properties":{}},"can":{"type":"object","properties":{"changeRunMode":{"type":"boolean"},"switchToTest":{"type":"boolean"},"takeLive":{"type":"boolean"}},"required":["changeRunMode","switchToTest","takeLive"]}},"required":["flowId","target","runMode","runModeChosen","changedAt","liveSince","cleanRuns","suggestion","resumable","pendingGoLive","can"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/switch-to-test":{"post":{"operationId":"switchFlowToTest","tags":["Flows"],"summary":"Switch a flow back to Test","description":"Immediate: the Live copy stops and Live runs that have not started are cancelled; runs already working finish. Owners, admins and Connect operators. Recorded in the audit log.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"target":{"type":"string","enum":["test","live"]},"runMode":{"type":"string","enum":["always_on","supervised"]},"runModeChosen":{"type":"boolean"},"changedAt":{"type":["string","null"]},"liveSince":{"type":["string","null"]},"cleanRuns":{"type":"integer"},"suggestion":{"type":["object","null"],"properties":{}},"resumable":{"type":["object","null"],"properties":{}},"pendingGoLive":{"type":["object","null"],"properties":{}},"can":{"type":"object","properties":{"changeRunMode":{"type":"boolean"},"switchToTest":{"type":"boolean"},"takeLive":{"type":"boolean"}},"required":["changeRunMode","switchToTest","takeLive"]}},"required":["flowId","target","runMode","runModeChosen","changedAt","liveSince","cleanRuns","suggestion","resumable","pendingGoLive","can"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/take-live-again":{"post":{"operationId":"takeFlowLiveAgain","tags":["Flows"],"summary":"Take a flow live again","description":"For a flow switched back to Test with no change since: the go-live checks run again, then the same approved Live copy is switched back on with the chosen run mode. Answers 409 `go_live_required` when the flow changed; request a new go-live instead.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runMode":{"type":"string","enum":["always_on","supervised"]}},"required":["runMode"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"},"target":{"type":"string","enum":["test","live"]},"runMode":{"type":"string","enum":["always_on","supervised"]},"runModeChosen":{"type":"boolean"},"changedAt":{"type":["string","null"]},"liveSince":{"type":["string","null"]},"cleanRuns":{"type":"integer"},"suggestion":{"type":["object","null"],"properties":{}},"resumable":{"type":["object","null"],"properties":{}},"pendingGoLive":{"type":["object","null"],"properties":{}},"can":{"type":"object","properties":{"changeRunMode":{"type":"boolean"},"switchToTest":{"type":"boolean"},"takeLive":{"type":"boolean"}},"required":["changeRunMode","switchToTest","takeLive"]}},"required":["flowId","target","runMode","runModeChosen","changedAt","liveSince","cleanRuns","suggestion","resumable","pendingGoLive","can"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/read-progress":{"get":{"operationId":"getFlowReadProgress","tags":["Flows"],"summary":"Get read progress","description":"For flows that read only new records: how far each source has been read.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"stepKey":{"type":"string"},"status":{"type":"string"},"readUpTo":{},"needsAttention":{"type":"boolean"}},"required":["stepKey","status","needsAttention"]}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/read-progress/reset":{"post":{"operationId":"resetFlowReadProgress","tags":["Flows"],"summary":"Reset read progress","description":"The next run reads from the start again. Live flows need a deployment approver.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"stepKey":{"type":"string"},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."}},"required":["confirm"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"correlationId":{"type":"string"},"readProgress":{"type":"array","items":{"type":"object","properties":{}}}},"required":["correlationId","readProgress"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/templates":{"get":{"operationId":"listTemplates","tags":["Templates"],"summary":"List templates","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/templates/{templateKey}":{"get":{"operationId":"getTemplate","tags":["Templates"],"summary":"Get a template","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The template key."},"required":true,"name":"templateKey","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/templates/{templateKey}/install":{"post":{"operationId":"installTemplate","tags":["Templates"],"summary":"Install a template","description":"Creates an integration and its flows from the template.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The template key."},"required":true,"name":"templateKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string","minLength":3,"maxLength":120},"choices":{"type":"object","additionalProperties":{"type":"string"},"description":"For templates with choices: choice key to option."},"connections":{"type":"object","additionalProperties":{"type":"string"},"description":"Connector key to the connection id to use."},"applyApprovalPolicies":{"type":"boolean","description":"Also save the template's approval rules on the supplied connections. Defaults to false; when false they are returned as suggestions."}},"required":["projectId"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Integration"},"flow":{"$ref":"#/components/schemas/Flow"},"flowVersion":{"$ref":"#/components/schemas/FlowVersion"}},"required":["integration","flow","flowVersion"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/executions":{"post":{"operationId":"startRun","tags":["Runs"],"summary":"Start a run","description":"Starts a run of the flow's published version. Retrying with the same `idempotencyKey` returns the first run (with `replayed: true`) instead of starting another.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,160}$","description":"8 to 160 characters of letters, digits and `. _ : -`. Sending the same key again returns the first result instead of repeating the work.","example":"run-2026-10-01-orders-0001"},"correlationId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,160}$","description":"Your own reference for tracing this request across systems (8 to 160 characters).","example":"erp-batch-20261001-0001"},"triggerType":{"type":"string","enum":["manual","schedule","retry"]},"triggerReference":{"type":"string","description":"Your own reference for what started the run."},"inputId":{"type":"string","description":"An uploaded input (`POST /flows/{flowId}/inputs`). Required for flows that read an uploaded file, refused otherwise."},"endUserId":{"type":"string","description":"Run for one of your customers (an end user). Their own connections replace the app connections they connected through. Refused when they have not connected an app the flow needs."},"externalUserId":{"type":"string","maxLength":200,"description":"Your own id for the end user, instead of `endUserId`."}},"required":["environment","idempotencyKey","correlationId"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions":{"get":{"operationId":"listRuns","tags":["Runs"],"summary":"List runs","description":"Runs in the workspace, newest first.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"Only runs of this flow."},"required":false,"name":"flowId","in":"query"},{"schema":{"type":"string","description":"Only runs with this status, for example `failed`."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only runs for this end user."},"required":false,"name":"endUserId","in":"query"},{"schema":{"type":"integer","description":"How many to return: 1 to 100, default 50."},"required":false,"name":"pageSize","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Execution"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}":{"get":{"operationId":"getRun","tags":["Runs"],"summary":"Get a run","description":"The run with its steps, errors and recovery state.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/steps":{"get":{"operationId":"listRunSteps","tags":["Runs"],"summary":"List a run's steps","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/records":{"get":{"operationId":"listRunRecords","tags":["Runs"],"summary":"List a run's records","description":"Each record the run handled, with its status. Up to 1,000.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionRecord"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/records/{recordId}":{"get":{"operationId":"getRunRecord","tags":["Runs"],"summary":"Get one record of a run","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"},{"schema":{"type":"string","description":"The record id."},"required":true,"name":"recordId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionRecord"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/trace/records":{"get":{"operationId":"listRunTraceRecords","tags":["Runs"],"summary":"Find records in a run","description":"A run's records for picking one: searched by id, name or amount, filtered and paged on the server. Stopped records come first.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"},{"schema":{"type":"string","description":"Order, customer or invoice: matches record ids, names and amounts."},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","description":"`all` (default), `stopped`, `rule` (a value was set by your rule) or `skipped`."},"required":false,"name":"filter","in":"query"},{"schema":{"type":"integer","description":"Page number, from 0."},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","description":"How many to return: 1 to 100, default 50."},"required":false,"name":"pageSize","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRecordPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/trace/records/{recordId}":{"get":{"operationId":"getRunTraceRecord","tags":["Runs"],"summary":"See what happened to one record","description":"One record before → what Nexra did → after: each step in plain words, the rules that set values, and a field-by-field view. Sensitive values (email, phone, bank, card, ids, addresses, health data) are partly masked. Details are kept for 30 days unless your plan keeps them longer.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"},{"schema":{"type":"string","description":"The record id."},"required":true,"name":"recordId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRecord"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/trace/records/{recordId}/reveal":{"post":{"operationId":"revealRunTraceRecord","tags":["Runs"],"summary":"Show one record's hidden values","description":"The same as getting the record, with masked values shown. Workspace owners and admins only; every reveal is recorded in the audit log.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"},{"schema":{"type":"string","description":"The record id."},"required":true,"name":"recordId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRecord"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/cancel":{"post":{"operationId":"cancelRun","tags":["Runs"],"summary":"Cancel a run","description":"Asks a queued or running run to stop. Records already sent stay sent.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/executions/{executionId}/retry-failed":{"post":{"operationId":"retryRunFailures","tags":["Runs"],"summary":"Retry a run's failed records","description":"Retries up to 100 of the run's failed records.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The execution id."},"required":true,"name":"executionId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetryRequest"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/monitoring/summary":{"get":{"operationId":"getMonitoringSummary","tags":["Runs"],"summary":"Get a 24-hour summary","description":"Runs by status, connection health, open failed records and enabled schedules over the last 24 hours.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"connections":{"type":"array","items":{"type":"object","properties":{}}},"executions":{"type":"array","items":{"type":"object","properties":{}}},"openDeadLetters":{"type":"integer"},"enabledSchedules":{"type":"integer"}},"required":["window","connections","executions","openDeadLetters","enabledSchedules"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/schedules":{"post":{"operationId":"createSchedule","tags":["Schedules"],"summary":"Create a schedule","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cronExpression":{"type":"string","description":"Five-field cron, for example `0 6 * * 1-5`.","example":"0 6 * * 1-5"},"timezone":{"type":"string","description":"IANA time zone. Default `UTC`."},"name":{"type":"string"},"enabled":{"type":"boolean"}},"required":["cronExpression"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"get":{"operationId":"listSchedules","tags":["Schedules"],"summary":"List a flow's schedules","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/schedules/{scheduleId}":{"patch":{"operationId":"updateSchedule","tags":["Schedules"],"summary":"Update a schedule","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The schedule id."},"required":true,"name":"scheduleId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cronExpression":{"type":"string"},"timezone":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"deleteSchedule","tags":["Schedules"],"summary":"Delete a schedule","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The schedule id."},"required":true,"name":"scheduleId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/schedules/{scheduleId}/pause":{"post":{"operationId":"pauseSchedule","tags":["Schedules"],"summary":"Pause a schedule","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The schedule id."},"required":true,"name":"scheduleId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/schedules/{scheduleId}/resume":{"post":{"operationId":"resumeSchedule","tags":["Schedules"],"summary":"Resume a schedule","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The schedule id."},"required":true,"name":"scheduleId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/dead-letter":{"get":{"operationId":"listFailedRecords","tags":["Failed records"],"summary":"List failed records","description":"Records runs could not deliver, newest first. Up to 500.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"`open`, `retry_scheduled`, `retry_failed`, `resolved` or `ignored`."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FailedRecord"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/dead-letter/{deadLetterId}":{"get":{"operationId":"getFailedRecord","tags":["Failed records"],"summary":"Get a failed record","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The dead letter id."},"required":true,"name":"deadLetterId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailedRecord"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/dead-letter/{deadLetterId}/retry":{"post":{"operationId":"retryFailedRecord","tags":["Failed records"],"summary":"Retry a failed record","description":"Only `open` and `retry_failed` records can be retried.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The dead letter id."},"required":true,"name":"deadLetterId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,160}$","description":"8 to 160 characters of letters, digits and `. _ : -`. Sending the same key again returns the first result instead of repeating the work.","example":"run-2026-10-01-orders-0001"}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryRequest"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/dead-letter/retry":{"post":{"operationId":"retryFailedRecords","tags":["Failed records"],"summary":"Retry several failed records","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["ids"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetryRequest"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/dead-letter/{deadLetterId}/ignore":{"post":{"operationId":"ignoreFailedRecord","tags":["Failed records"],"summary":"Ignore a failed record","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The dead letter id."},"required":true,"name":"deadLetterId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"description":"Kept with the record."}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailedRecord"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/dead-letter/{deadLetterId}/resolve":{"post":{"operationId":"resolveFailedRecord","tags":["Failed records"],"summary":"Mark a failed record resolved","description":"Use when the record was fixed outside Nexra.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The dead letter id."},"required":true,"name":"deadLetterId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"description":"Kept with the record."}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailedRecord"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections":{"get":{"operationId":"listConnections","tags":["Connections"],"summary":"List connections","description":"Connections in the workspace, most recently changed first. Metadata only; credentials are never returned.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createConnection","tags":["Connections"],"summary":"Create a connection","description":"Creates a connection from settings and a stored credential reference. Add the credential itself in the console. A live (`production`) connection needs a healthy Test mode connection of the same connector as `sourceConnectionId`.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorKey":{"type":"string","description":"From the public connector catalogue."},"projectId":{"type":"string"},"name":{"type":"string","minLength":3,"maxLength":100},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"slug":{"type":"string"},"sourceConnectionId":{"type":"string"},"configuration":{"type":"object","properties":{"secretReference":{"type":"string","description":"Reference to a credential already stored for this workspace in the console. Never the credential itself."}},"description":"Non-secret, connector-specific settings such as `baseUrl` or `accountReference`. Fields named like passwords, API keys, tokens, client secrets or credentials are refused."}},"required":["connectorKey","projectId","name"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}":{"get":{"operationId":"getConnection","tags":["Connections"],"summary":"Get a connection","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"operationId":"updateConnection","tags":["Connections"],"summary":"Update a connection","description":"Changing settings puts the connection back to draft until it is tested again.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"configuration":{"type":"object","properties":{"secretReference":{"type":"string","description":"Reference to a credential already stored for this workspace in the console. Never the credential itself."}},"description":"Non-secret, connector-specific settings such as `baseUrl` or `accountReference`. Fields named like passwords, API keys, tokens, client secrets or credentials are refused."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/test":{"post":{"operationId":"testConnection","tags":["Connections"],"summary":"Test a connection","description":"Calls the provider with the stored credential. A failure answers 400 with the reason in plain words.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"correlationId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,160}$","description":"Your own reference for tracing this request across systems (8 to 160 characters).","example":"erp-batch-20261001-0001"}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["healthy"]},"latencyMs":{"type":"integer"},"detail":{}},"required":["status","latencyMs"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/disable":{"post":{"operationId":"disableConnection","tags":["Connections"],"summary":"Turn a connection off","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/health":{"get":{"operationId":"getConnectionHealth","tags":["Connections"],"summary":"Get connection health","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/capabilities":{"get":{"operationId":"getConnectionCapabilities","tags":["Connections"],"summary":"List what a connection can do","description":"The provider operations this connection can read and write.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/live-check":{"get":{"operationId":"getLiveCheck","tags":["Connections"],"summary":"Get a live connection's latest check","description":"Live connections only.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCheck"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"runLiveCheck","tags":["Connections"],"summary":"Check a live connection now","description":"Confirms the live credential still reaches the right account. Live connections only.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCheck"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-user-link-apps":{"get":{"operationId":"listEndUserLinkApps","tags":["End users"],"summary":"List apps your customers can connect through","description":"Your workspace connections that sign in with the provider's own page and have your app's client ID and secret saved. Customers connect through your own app; their sign-in runs under your app's keys.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"apps":{"type":"array","items":{"type":"object","properties":{}}}},"required":["apps"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-users":{"get":{"operationId":"listEndUsers","tags":["End users"],"summary":"List end users","description":"Your customers and the accounts they connected, newest first.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"`active` (default), `erased` or `all`."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only customers with a current connection to this app, for example `xero`."},"required":false,"name":"connectorKey","in":"query"},{"schema":{"type":"string","description":"Search your id, name or email."},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","description":"How many to return: 1 to 100, default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","description":"How many to skip."},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"endUsers":{"type":"array","items":{"$ref":"#/components/schemas/EndUser"}}},"required":["total","endUsers"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"upsertEndUser","tags":["End users"],"summary":"Add an end user","description":"Adds a customer by your own id for them, or updates the name and email of one you already added. Scoped to the workspace, or to one project when `projectId` is given.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalUserId":{"type":"string","minLength":1,"maxLength":200},"projectId":{"type":"string"},"displayName":{"type":"string","maxLength":120},"email":{"type":"string","maxLength":254}},"required":["externalUserId"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-users/{endUserId}":{"get":{"operationId":"getEndUser","tags":["End users"],"summary":"Get an end user","description":"The customer with their connections, consent history, links, data requests and recent runs.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The end user id."},"required":true,"name":"endUserId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-users/{endUserId}/links":{"post":{"operationId":"createEndUserLink","tags":["End users"],"summary":"Create a link for an end user","description":"A short-lived, single-use, signed link to send your customer. `connect` opens a page that explains your purpose in plain words, records their agreement and then sends them to the app's own sign-in page; `manage` lets them see and withdraw what they connected. Links last 30 minutes unless you choose 5 to 120.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The end user id."},"required":true,"name":"endUserId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["connect","manage"]},"appConnectionId":{"type":"string","description":"Required for `connect`: from `listEndUserLinkApps`."},"purpose":{"type":"string","minLength":10,"maxLength":300,"description":"Required for `connect`: why you need the connection, shown to the customer word for word."},"purposeKey":{"type":"string","description":"Your short label for this purpose."},"account":{"type":"object","additionalProperties":{"type":"string"},"description":"Account details the app needs, if you know them (for example a store or subdomain name)."},"returnUrl":{"type":"string","format":"uri","description":"Where to send the customer afterwards (https)."},"expiresInMinutes":{"type":"integer","minimum":5,"maximum":120}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"linkId":{"type":"string"},"kind":{"type":"string","enum":["connect","manage"]},"endUserId":{"type":"string"},"connectorKey":{"type":["string","null"]},"appName":{"type":["string","null"]},"url":{"type":"string","description":"Send this to your customer. It works once and expires."},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."}},"required":["linkId","kind","endUserId","connectorKey","appName","url","expiresAt"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-users/{endUserId}/connections/{connectionId}/revoke":{"post":{"operationId":"revokeEndUserConnection","tags":["End users"],"summary":"Withdraw an end user's connection","description":"Deletes the stored access, turns the connection off and marks its consent revoked (the consent record is kept). Set `onBehalfOfEndUser` when your customer asked for it.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The end user id."},"required":true,"name":"endUserId","in":"path"},{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500},"onBehalfOfEndUser":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-users/{endUserId}/access-requests":{"post":{"operationId":"requestEndUserAccess","tags":["End users"],"summary":"Export what is held about an end user","description":"Records an access request and returns the export: connections, consent records, links and run metadata. Sign-in secrets are never included.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The end user id."},"required":true,"name":"endUserId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/DataSubjectRequest"},"export":{"type":"object","properties":{}}},"required":["request","export"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/end-users/{endUserId}/erasure-requests":{"post":{"operationId":"requestEndUserErasure","tags":["End users"],"summary":"Ask to erase an end user","description":"Records an erasure request. Nothing is erased until a workspace owner or admin approves it in the console; then stored access is deleted, personal data is cleared from run records and a minimal record of the erasure is kept.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The end user id."},"required":true,"name":"endUserId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSubjectRequest"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/data-requests":{"get":{"operationId":"listDataRequests","tags":["End users"],"summary":"List access and erasure requests","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"For example `pending_approval` or `completed`."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"`access` or `erasure`."},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/DataSubjectRequest"}}},"required":["requests"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/data-requests/{requestId}":{"get":{"operationId":"getDataRequest","tags":["End users"],"summary":"Get an access or erasure request","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The request id."},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSubjectRequest"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/data-requests/{requestId}/export":{"get":{"operationId":"getDataRequestExport","tags":["End users"],"summary":"Download an access export again","description":"Generated again now. Not available once the end user has been erased.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The request id."},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/builtin-operations":{"get":{"operationId":"listBuiltinOperations","tags":["Records"],"summary":"List Nexra built-in operations","description":"The operations a flow step of kind `builtin` can run on your workspace's own records, with their fields: obligations.create, obligations.list, obligations.update, obligations.complete, evidence_matrix.create, asset_customers.list, statements.generate and statements.get.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{}}}},"required":["operations"],"example":{"operations":[{"key":"asset_customers.list","label":"Find customers of an asset","description":"Lists the customers an asset or segment serves, with their CRM ids, from the workspace customer map.","mode":"read","input":[{"path":"asset","label":"Asset or segment","type":"string","required":true}],"output":[{"path":"count","label":"Number of customers","type":"number"},{"path":"items","label":"Customers","type":"array"}]}]}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations":{"get":{"operationId":"listObligations","tags":["Records"],"summary":"List obligations","description":"Obligations ordered by due date, with counts of open, due soon and overdue ones.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"`open`, `due_soon`, `overdue`, `done`, `waived` or `active` (anything not done or waived)."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Search the reference, counterparty, obligation and clause."},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","description":"Only this contract or agreement."},"required":false,"name":"reference","in":"query"},{"schema":{"type":"string","description":"Only obligations this member owns."},"required":false,"name":"ownerUserId","in":"query"},{"schema":{"type":"string","description":"`returns` for returns and filings, or `obligation`, `return` or `filing`."},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","description":"Only this regulator (exact, any case)."},"required":false,"name":"regulator","in":"query"},{"schema":{"type":"integer","description":"How many to return: 1 to 500, default 200."},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"counts":{"type":"object","properties":{"open":{"type":"integer"},"dueSoon":{"type":"integer"},"overdue":{"type":"integer"}},"required":["open","dueSoon","overdue"]},"regulators":{"type":"array","items":{"type":"string"},"description":"The regulators this workspace entered, for a filter."},"obligations":{"type":"array","items":{"$ref":"#/components/schemas/Obligation"}}},"required":["total","counts","regulators","obligations"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createObligation","tags":["Records"],"summary":"Add an obligation","description":"Nexra reminds the owner before it is due (14 days unless you choose otherwise) and when it is overdue.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","maxLength":200},"counterparty":{"type":"string","maxLength":200},"text":{"type":"string","maxLength":2000},"dueDate":{"type":"string","description":"YYYY-MM-DD. For a repeating obligation, the next due date."},"recurrence":{"type":"string","enum":["none","weekly","monthly","quarterly","yearly"]},"sourceClause":{"type":"string","maxLength":200},"ownerUserId":{"type":"string","description":"A member of the workspace (from `listObligationOwners`)."},"ownerTeam":{"type":"string","maxLength":120},"reminderLeadDays":{"type":"integer","minimum":1,"maximum":365,"description":"Default 14."},"evidenceLinks":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":20},"kind":{"type":"string","enum":["obligation","return","filing"],"description":"Default `obligation`. Set when it is added."},"regulator":{"type":"string","maxLength":120,"description":"Required for a return or filing."},"period":{"type":"string","maxLength":60},"periodStart":{"type":"string","description":"YYYY-MM-DD."},"periodEnd":{"type":"string","description":"YYYY-MM-DD."},"checkerUserId":{"type":"string","description":"Who approves a return's file: a different member from the owner."}},"required":["reference","counterparty","text","dueDate"],"example":{"reference":"Gas supply agreement GSA-2024-07","counterparty":"Northfield Power","text":"Send the monthly volume statement","dueDate":"2026-10-31","recurrence":"monthly","sourceClause":"7.2","ownerTeam":"Finance","reminderLeadDays":14}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Obligation"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligation-owners":{"get":{"operationId":"listObligationOwners","tags":["Records"],"summary":"List who can own an obligation","description":"Active workspace members, by name only.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["members"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}":{"get":{"operationId":"getObligation","tags":["Records"],"summary":"Get an obligation","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Obligation"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"operationId":"updateObligation","tags":["Records"],"summary":"Change an obligation","description":"Send only the fields to change. To waive it, send `status: waived` with `waivedReason`; to reopen it, `status: open`.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","maxLength":200},"counterparty":{"type":"string","maxLength":200},"text":{"type":"string","maxLength":2000},"dueDate":{"type":"string","description":"YYYY-MM-DD. For a repeating obligation, the next due date."},"recurrence":{"type":"string","enum":["none","weekly","monthly","quarterly","yearly"]},"sourceClause":{"type":"string","maxLength":200},"ownerUserId":{"type":"string","description":"A member of the workspace (from `listObligationOwners`)."},"ownerTeam":{"type":"string","maxLength":120},"reminderLeadDays":{"type":"integer","minimum":1,"maximum":365,"description":"Default 14."},"evidenceLinks":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":20},"kind":{"type":"string","enum":["obligation","return","filing"],"description":"Default `obligation`. Set when it is added."},"regulator":{"type":"string","maxLength":120,"description":"Required for a return or filing."},"period":{"type":"string","maxLength":60},"periodStart":{"type":"string","description":"YYYY-MM-DD."},"periodEnd":{"type":"string","description":"YYYY-MM-DD."},"checkerUserId":{"type":"string","description":"Who approves a return's file: a different member from the owner."},"status":{"type":"string","enum":["waived","open"]},"waivedReason":{"type":"string","maxLength":500}},"example":{"reference":"Gas supply agreement GSA-2024-07","counterparty":"Northfield Power","text":"Send the monthly volume statement","dueDate":"2026-10-31","recurrence":"monthly","sourceClause":"7.2","ownerTeam":"Finance","reminderLeadDays":14}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Obligation"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/complete":{"post":{"operationId":"completeObligation","tags":["Records"],"summary":"Mark an obligation done","description":"Completes the current due date. A repeating obligation moves on to its next due date and stays open. A return or filing can't be completed here: a person marks it filed with proof (`markObligationFiled`).","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"evidenceLinks":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":20}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Obligation"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/filing":{"get":{"operationId":"getObligationFiling","tags":["Records"],"summary":"Get a return's file, checks and proof","description":"The prepared file, the checks (calculated by Nexra, no AI), the approval and the proof of filing. Nexra prepares and reminds; a person files with the regulator.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationFiling"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/filing/prepare":{"post":{"operationId":"prepareObligationFiling","tags":["Records"],"summary":"Prepare a return's file","description":"Generate the file from figures (`source: generated`, xlsx or csv), use a statement (`statementId`) or a draft uploaded to `/obligations/:obligationId/files` (`fileId`). The checks are calculated straight away. A file waiting for approval or approved can't be replaced.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["generated","statement","upload"]},"format":{"type":"string","enum":["xlsx","csv"]},"fileName":{"type":"string","maxLength":120},"fileId":{"type":"string"},"statementId":{"type":"string"},"figures":{"type":"object","properties":{"period":{"type":"object","properties":{"label":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"}}},"currency":{"type":"string","minLength":3,"maxLength":3},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string","maxLength":120},"value":{"type":["number","null"]},"previous":{"type":["number","null"],"description":"The same figure for the last period."},"source":{"type":"string","maxLength":120,"description":"Where the figure comes from."},"required":{"type":"boolean"},"calculated":{"type":"boolean"}},"required":["label"]},"maxItems":200},"reconcile":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"lineKey":{"type":"string"},"expected":{"type":"number"},"source":{"type":"string","maxLength":120},"tolerance":{"type":"number","minimum":0}},"required":["label","lineKey","expected"]},"maxItems":20,"description":"Totals from your ledger or reconciliation the figures must match."},"movementThresholdPercent":{"type":"number","description":"Movements on the last period at or above this need a note. Default 25."}},"required":["lines"]}},"required":["source"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationFiling"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/filing/notes":{"patch":{"operationId":"saveObligationFilingNotes","tags":["Records"],"summary":"Add notes on flagged figures","description":"Notes by figure key, for example on a large movement. The checks are calculated again.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"object","additionalProperties":{"type":"string","maxLength":1000}}},"required":["notes"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationFiling"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/filing/approval":{"post":{"operationId":"sendObligationFilingForApproval","tags":["Records"],"summary":"Send a return's file for approval","description":"Opens a review task in the workspace approvals. Only the person who prepared the file sends it, and they can't approve it. Every check must pass first.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationFiling"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/filing/decision":{"post":{"operationId":"decideObligationFiling","tags":["Records"],"summary":"Approve a return for filing or send it back","description":"A different member with approval rights decides. Sending it back needs a reason. The file is locked once approved.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string","maxLength":500}},"required":["decision"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationFiling"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/obligations/{obligationId}/filing/filed":{"post":{"operationId":"markObligationFiled","tags":["Records"],"summary":"Mark a return as filed","description":"Records that a person filed the approved return with the regulator. Proof is required: the acknowledgement file (uploaded to `/obligations/:obligationId/files`), the filing reference, the date filed and who filed. For a repeating return the next period's obligation is created.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The obligation id."},"required":true,"name":"obligationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proofFileId":{"type":"string"},"filingReference":{"type":"string","minLength":3,"maxLength":120},"filedOn":{"type":"string","description":"YYYY-MM-DD, not in the future."},"filedByUserId":{"type":"string"},"filedByName":{"type":"string","maxLength":120,"description":"When the person who filed isn't a workspace member."}},"required":["proofFileId","filingReference","filedOn"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationFiling"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/asset-customers":{"get":{"operationId":"listAssetCustomers","tags":["Records"],"summary":"List the asset-to-customer map","description":"Which customers each asset or segment serves. Filter by one asset for the customers it affects.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"Only this asset or segment (exact, any case)."},"required":false,"name":"asset","in":"query"},{"schema":{"type":"string","description":"Search assets, customers and CRM ids."},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","description":"How many to return: 1 to 1,000, default 200."},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"customers":{"type":"array","items":{"$ref":"#/components/schemas/AssetCustomer"}},"assets":{"type":"array","items":{"type":"object","properties":{"assetKey":{"type":"string"},"customers":{"type":"integer"}},"required":["assetKey","customers"]}}},"required":["total","customers","assets"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"addAssetCustomer","tags":["Records"],"summary":"Add a customer to an asset","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetKey":{"type":"string","maxLength":120},"assetName":{"type":"string","maxLength":200},"customerName":{"type":"string","maxLength":200},"crmId":{"type":"string","maxLength":120},"externalId":{"type":"string","maxLength":120}},"required":["assetKey","customerName"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"integer"},"removed":{"type":"integer"},"assets":{"type":"integer"}},"required":["saved","removed","assets"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/asset-customers/upload":{"post":{"operationId":"uploadAssetCustomers","tags":["Records"],"summary":"Upload the asset-to-customer map","description":"CSV text with `asset` and `customer` columns (optional: `asset_name`, `crm_id`, `external_id`). `add` keeps existing rows; `replace` first removes the customers of every asset in the file.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string"},"mode":{"type":"string","enum":["add","replace"]}},"required":["csv"],"example":{"csv":"asset,customer,crm_id\nSection 4,Northfield Power,0015g00000ABCDE\nSection 4,Riverside Bakery,0015g00000FGHIJ","mode":"add"}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"integer"},"removed":{"type":"integer"},"assets":{"type":"integer"}},"required":["saved","removed","assets"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/asset-customers/{assetCustomerId}":{"delete":{"operationId":"removeAssetCustomer","tags":["Records"],"summary":"Remove a customer from an asset","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The asset customer id."},"required":true,"name":"assetCustomerId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}},"required":["removed"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/evidence-matrices":{"get":{"operationId":"listEvidenceMatrices","tags":["Records"],"summary":"List evidence matrices","description":"Needs a role that manages records or decides approvals: matrices can hold people's details.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"`pending_review`, `reviewed` or `returned`."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"matrices":{"type":"array","items":{"type":"object","properties":{}}}},"required":["matrices"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createEvidenceMatrix","tags":["Records"],"summary":"Make an evidence matrix","description":"Rows by criteria, each cell evidenced (with a quote) or not evidenced, plus clarification questions. Opens a review task. Scores, ranks, outcomes and criteria about protected characteristics are refused.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":160},"subject":{"type":"string","maxLength":60,"description":"What the rows are, for example `candidates`."},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string","maxLength":200}},"required":["label"]},"minItems":1,"maxItems":30},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string","maxLength":200},"cells":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["evidenced","not_evidenced"],"description":"`not_evidenced` means only that the supplied information did not show it. It is never a rejection."},"quote":{"type":["string","null"]},"source":{"type":["string","null"]}},"required":["status"]}}},"required":["label","cells"]},"minItems":1,"maxItems":200},"questions":{"type":"array","items":{"type":"object","properties":{"rowKey":{"type":"string"},"question":{"type":"string","maxLength":500}},"required":["question"]},"maxItems":50}},"required":["title","criteria","rows"],"example":{"title":"Site engineer applications, October","subject":"candidates","criteria":[{"key":"gas_safe","label":"Holds a current Gas Safe registration"},{"key":"experience","label":"Three years of network maintenance experience"}],"rows":[{"key":"candidate_a","label":"Candidate A","cells":{"gas_safe":{"status":"evidenced","quote":"Gas Safe registered since 2019","source":"CV, page 1"},"experience":{"status":"not_evidenced"}}}],"questions":[{"rowKey":"candidate_a","question":"How many years of network maintenance have you done?"}]}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/evidence-matrices/{matrixId}":{"get":{"operationId":"getEvidenceMatrix","tags":["Records"],"summary":"Get an evidence matrix","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The matrix id."},"required":true,"name":"matrixId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceMatrix"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/evidence-matrices/{matrixId}/review":{"post":{"operationId":"requestEvidenceMatrixReview","tags":["Records"],"summary":"Send an evidence matrix for review","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The matrix id."},"required":true,"name":"matrixId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceMatrix"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/evidence-matrices/{matrixId}/decision":{"post":{"operationId":"decideEvidenceMatrix","tags":["Records"],"summary":"Review an evidence matrix","description":"Mark it reviewed (`approved`) or send it back (`rejected`, with a reason). The person who sent it for review can't decide it.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The matrix id."},"required":true,"name":"matrixId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string","maxLength":500,"description":"Needed when sending it back."}},"required":["decision"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceMatrix"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/statements":{"get":{"operationId":"listStatements","tags":["Records"],"summary":"List statements","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"`pending_approval`, `approved` or `rejected`."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"statements":{"type":"array","items":{"type":"object","properties":{}}}},"required":["statements"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createStatement","tags":["Records"],"summary":"Make a statement","description":"Makes a monthly volume statement from your data (totals are worked out by Nexra) and opens its approval. Nothing can send it until it is approved.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","enum":["monthly_volume"]},"title":{"type":"string","maxLength":160},"customerName":{"type":"string","maxLength":200},"customerRef":{"type":"string","maxLength":120},"periodStart":{"type":"string","description":"YYYY-MM-DD"},"periodEnd":{"type":"string","description":"YYYY-MM-DD"},"unit":{"type":"string","maxLength":20},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"volume":{"type":"number"}},"required":["date","volume"]},"minItems":1,"maxItems":400},"invoices":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","maxLength":120},"amount":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["reference"]},"maxItems":50},"note":{"type":"string","maxLength":1000}},"required":["customerName","periodStart","periodEnd","days"],"example":{"template":"monthly_volume","customerName":"Northfield Power","customerRef":"ACC-1042","periodStart":"2026-09-01","periodEnd":"2026-09-30","unit":"MWh","days":[{"date":"2026-09-01","volume":412.5},{"date":"2026-09-02","volume":398.2}],"invoices":[{"reference":"INV-2026-0931","amount":48250,"currency":"GBP"}],"note":"Volumes are from the network meter at the delivery point."}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/statements/{statementId}":{"get":{"operationId":"getStatement","tags":["Records"],"summary":"Get a statement","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The statement id."},"required":true,"name":"statementId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/statements/{statementId}/approval":{"post":{"operationId":"requestStatementApproval","tags":["Records"],"summary":"Send a statement for approval","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The statement id."},"required":true,"name":"statementId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/statements/{statementId}/decision":{"post":{"operationId":"decideStatement","tags":["Records"],"summary":"Approve a statement","description":"Approve it, or send it back with a reason. The person who sent it for approval can't decide it.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The statement id."},"required":true,"name":"statementId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string","maxLength":500,"description":"Needed when sending it back."}},"required":["decision"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/trigger-catalogue":{"get":{"operationId":"listTriggerCatalogue","tags":["Triggers"],"summary":"List provider events that can start flows","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"name":{"type":"string"},"scheme":{"type":"string"},"setup":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]}}},"required":["provider","name","scheme","setup","events"]}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/triggers":{"post":{"operationId":"createTrigger","tags":["Triggers"],"summary":"Create a webhook trigger","description":"Gives the flow a URL that starts a run when a signed request arrives. Without `connectionId` it is a signed trigger: by default Nexra makes a signing secret (`nexra_v1`) and returns it once. With `connectionId` and `events` it listens to that provider's events. Provider-issued signing secrets are added in the console.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"verification":{"type":"string","description":"How requests are verified. Default `nexra_v1`; provider schemes include `shopify`, `stripe` and `github`."},"eventTypes":{"type":"array","items":{"type":"string"},"maxItems":20},"shopDomain":{"type":"string","description":"Shopify only."},"connectionId":{"type":"string","description":"Listen to this connection's provider events."},"events":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":20,"description":"Event keys from the connection's event list."},"setup":{"type":"string","enum":["automatic","guided"]},"maxBodyBytes":{"type":"integer","minimum":1024,"maximum":102400,"description":"Default 65,536."},"maxDeliveriesPerMinute":{"type":"integer","minimum":1,"maximum":600,"description":"Default 60."},"timestampToleranceSeconds":{"type":"integer","minimum":30,"maximum":900,"description":"Default 300."},"inputRetentionDays":{"type":"integer","minimum":1,"maximum":30,"description":"Default 7."}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerWithSecret"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"get":{"operationId":"listTriggers","tags":["Triggers"],"summary":"List a flow's webhook triggers","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Trigger"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/triggers/{triggerId}":{"get":{"operationId":"getTrigger","tags":["Triggers"],"summary":"Get a webhook trigger","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The trigger id."},"required":true,"name":"triggerId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"deleteTrigger","tags":["Triggers"],"summary":"Delete a trigger","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The trigger id."},"required":true,"name":"triggerId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/triggers/{triggerId}/rotate":{"post":{"operationId":"rotateTriggerSecret","tags":["Triggers"],"summary":"Rotate a trigger's signing secret","description":"Makes a new signing secret, returned once. The old one keeps working for `graceMinutes`.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The trigger id."},"required":true,"name":"triggerId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"graceMinutes":{"type":"integer","minimum":0,"maximum":1440}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerWithSecret"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/triggers/{triggerId}/register":{"post":{"operationId":"registerTrigger","tags":["Triggers"],"summary":"Register a trigger with the provider","description":"For triggers with automatic setup: asks the provider to start sending events.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The trigger id."},"required":true,"name":"triggerId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/triggers/{triggerId}/disable":{"post":{"operationId":"disableTrigger","tags":["Triggers"],"summary":"Turn a trigger off","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The trigger id."},"required":true,"name":"triggerId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/triggers/{triggerId}/deliveries":{"get":{"operationId":"listTriggerDeliveries","tags":["Triggers"],"summary":"List a trigger's deliveries","description":"The latest 100 requests the trigger received, accepted or refused.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"The trigger id."},"required":true,"name":"triggerId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TriggerDelivery"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/trigger-events":{"get":{"operationId":"listConnectionTriggerEvents","tags":["Triggers"],"summary":"List a connection's webhook events","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"provider":{"type":"string"},"available":{"type":"boolean"},"events":{"type":"array","items":{"type":"object","properties":{}}}},"required":["connectionId","provider","available","events"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/connections/{connectionId}/record-events":{"get":{"operationId":"listConnectionRecordEvents","tags":["Triggers"],"summary":"List a connection's pollable events","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The connection id."},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"provider":{"type":"string"},"available":{"type":"boolean"},"events":{"type":"array","items":{"type":"object","properties":{}}}},"required":["connectionId","provider","available","events"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/poll-triggers":{"post":{"operationId":"createPollTrigger","tags":["Triggers"],"summary":"Create a polling trigger","description":"Checks the provider on a timetable and starts a run for new or changed records.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"event":{"type":"string","description":"`poll:<operationKey>`, from the connection's pollable events."},"operationKey":{"type":"string","description":"Instead of `event`."},"intervalMinutes":{"anyOf":[{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[1440]}],"description":"Minutes between checks: 5, 15, 60 or 1440."},"environment":{"type":"string","enum":["sandbox","production"],"description":"Must match the connection."},"input":{"type":"object","properties":{}},"name":{"type":"string","maxLength":120}},"required":["connectionId"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollTrigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"get":{"operationId":"listPollTriggers","tags":["Triggers"],"summary":"List a flow's polling triggers","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PollTrigger"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/poll-triggers/{pollTriggerId}":{"get":{"operationId":"getPollTrigger","tags":["Triggers"],"summary":"Get a polling trigger","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The poll trigger id."},"required":true,"name":"pollTriggerId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollTrigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"operationId":"updatePollTrigger","tags":["Triggers"],"summary":"Change how often a polling trigger checks","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The poll trigger id."},"required":true,"name":"pollTriggerId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intervalMinutes":{"anyOf":[{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[1440]}],"description":"Minutes between checks: 5, 15, 60 or 1440."}},"required":["intervalMinutes"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollTrigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"deletePollTrigger","tags":["Triggers"],"summary":"Delete a polling trigger","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The poll trigger id."},"required":true,"name":"pollTriggerId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/poll-triggers/{pollTriggerId}/pause":{"post":{"operationId":"pausePollTrigger","tags":["Triggers"],"summary":"Pause a polling trigger","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The poll trigger id."},"required":true,"name":"pollTriggerId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollTrigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/poll-triggers/{pollTriggerId}/resume":{"post":{"operationId":"resumePollTrigger","tags":["Triggers"],"summary":"Resume a polling trigger","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The poll trigger id."},"required":true,"name":"pollTriggerId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollTrigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/poll-triggers/{pollTriggerId}/check-now":{"post":{"operationId":"checkPollTriggerNow","tags":["Triggers"],"summary":"Check now","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The poll trigger id."},"required":true,"name":"pollTriggerId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollTrigger"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/flows/{flowId}/inputs":{"post":{"operationId":"uploadFlowInput","tags":["Triggers"],"summary":"Upload a file for a flow","description":"Send the raw file as the request body with `Content-Type: text/csv` or `application/json`. Then start a run with the returned `inputId`. Records that do not match the flow's input answer 422.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"},{"schema":{"type":"string","description":"The original file name, for display."},"required":false,"name":"fileName","in":"query"},{"schema":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"required":false,"name":"environment","in":"query"}],"requestBody":{"required":true,"content":{"text/csv":{"schema":{"type":"string","description":"The CSV file, with a header row."}},"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{}}},{"type":"object","properties":{}}],"description":"The records as JSON, in the shape the flow's input expects."}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowInput"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"get":{"operationId":"listFlowInputs","tags":["Triggers"],"summary":"List a flow's uploaded files","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"The flow id."},"required":true,"name":"flowId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FlowInput"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/connect/triggers/{publicId}":{"post":{"operationId":"deliverTriggerEvent","tags":["Triggers"],"summary":"Send an event to a webhook trigger","description":"Public URL for senders. Sign the raw body: `X-Nexra-Signature: v1=<hex HMAC-SHA256>` over `v1:<timestamp>:<eventId>:<raw body>`, keyed with the trigger's secret. Each event id is used once; a repeat with the same body answers 200 with `duplicate: true`. Refusals answer `{ accepted: false, code }`.","security":[{"triggerSignature":[]}],"parameters":[{"schema":{"type":"string","description":"The trigger's public id from its `url`."},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string","description":"Unique per event: 8 to 128 of `A-Z a-z 0-9 . _ : -`."},"required":true,"name":"X-Nexra-Event-Id","in":"header"},{"schema":{"type":"string","description":"Unix seconds when you signed."},"required":true,"name":"X-Nexra-Timestamp","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"description":"Your event as JSON."}}}},"responses":{"200":{"description":"Accepted by a provider-scheme trigger, or a repeat of an event already received (`duplicate: true`)."},"202":{"description":"Accepted. A run was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerDeliveryResult"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-options":{"get":{"operationId":"getReconciliationOptions","tags":["Reconciliation"],"summary":"List what can be reconciled","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"required":false,"name":"environment","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string"},"apps":{"type":"array","items":{"type":"object","properties":{}}}},"required":["environment","apps"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-templates":{"get":{"operationId":"listReconciliationTemplates","tags":["Reconciliation"],"summary":"List reconciliation templates","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{}}}},"required":["templates"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations":{"get":{"operationId":"listReconciliations","tags":["Reconciliation"],"summary":"List reconciliations","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"required":false,"name":"environment","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"reconciliations":{"type":"array","items":{"$ref":"#/components/schemas/Reconciliation"}}},"required":["reconciliations"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createReconciliation","tags":["Reconciliation"],"summary":"Create a reconciliation","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":120},"environment":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"source":{"type":"object","properties":{"kind":{"type":"string","description":"`connection` or `upload`."},"connectorKey":{"type":"string"},"connectionId":{"type":"string","description":"Required unless this side is an upload."},"recordTypes":{"type":"array","items":{"type":"string"}}},"required":["kind","recordTypes"]},"target":{"type":"object","properties":{"kind":{"type":"string","description":"`connection` or `upload`."},"connectorKey":{"type":"string"},"connectionId":{"type":"string","description":"Required unless this side is an upload."},"recordTypes":{"type":"array","items":{"type":"string"}}},"required":["kind","recordTypes"]},"rules":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string","enum":["reference","group_reference","payout_lines","amount_date","amount_counterparty"]}},"tolerance":{"type":"object","properties":{"amountAbsoluteMinor":{"type":"integer","minimum":0,"maximum":100000000},"amountPercentBasisPoints":{"type":"integer","minimum":0,"maximum":1000},"dateWindowDays":{"type":"integer","minimum":0,"maximum":31},"fxBasisPoints":{"type":"integer","minimum":0,"maximum":1000}}},"baseCurrency":{"type":"string"}}},"schedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["manual","hourly","daily","weekly"]},"time":{"type":"string","description":"`HH:MM`."},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency"]},"timezone":{"type":"string"},"lookbackDays":{"type":"integer","minimum":1,"maximum":365},"description":{"type":"string","maxLength":500},"templateKey":{"type":"string"},"ownerId":{"type":"string"}},"required":["name","source","target"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"reconciliation":{"$ref":"#/components/schemas/Reconciliation"}},"required":["reconciliation"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations/{id}":{"get":{"operationId":"getReconciliation","tags":["Reconciliation"],"summary":"Get a reconciliation","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"reconciliation":{"$ref":"#/components/schemas/Reconciliation"},"runs":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationRun"}}},"required":["reconciliation","runs"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"operationId":"updateReconciliation","tags":["Reconciliation"],"summary":"Update a reconciliation","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"rules":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string","enum":["reference","group_reference","payout_lines","amount_date","amount_counterparty"]}},"tolerance":{"type":"object","properties":{"amountAbsoluteMinor":{"type":"integer","minimum":0,"maximum":100000000},"amountPercentBasisPoints":{"type":"integer","minimum":0,"maximum":1000},"dateWindowDays":{"type":"integer","minimum":0,"maximum":31},"fxBasisPoints":{"type":"integer","minimum":0,"maximum":1000}}},"baseCurrency":{"type":"string"}}},"sourceRecordTypes":{"type":"array","items":{"type":"string"}},"targetRecordTypes":{"type":"array","items":{"type":"string"}},"schedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["manual","hourly","daily","weekly"]},"time":{"type":"string","description":"`HH:MM`."},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency"]},"timezone":{"type":"string"},"ownerId":{"type":"string"},"status":{"type":"string","enum":["active","paused"]}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"reconciliation":{"$ref":"#/components/schemas/Reconciliation"}},"required":["reconciliation"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations/{id}/run":{"post":{"operationId":"runReconciliation","tags":["Reconciliation"],"summary":"Run a reconciliation now","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/ReconciliationRun"}},"required":["run"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations/{id}/runs":{"get":{"operationId":"listReconciliationRuns","tags":["Reconciliation"],"summary":"List a reconciliation's runs","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationRun"}}},"required":["runs"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations/{id}/candidates":{"get":{"operationId":"listReconciliationCandidates","tags":["Reconciliation"],"summary":"Search records to match by hand","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["source","target"]},"required":false,"name":"side","in":"query"},{"schema":{"type":"string","description":"Text to look for, up to 100 characters."},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","description":"Up to 200. Default 50."},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"side":{"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{}}}},"required":["side","records"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations/{id}/uploads":{"post":{"operationId":"uploadReconciliationRecords","tags":["Reconciliation"],"summary":"Upload records as CSV","description":"For a side that is an upload, such as a bank statement. Send the CSV text as `content` in a JSON body. A contribution reconciliation takes `side` `schedule`, `payment`, `custodian` or `posting`, and Excel files base64-encoded with `format` `xlsx`; RSA PINs are kept only as a fingerprint and their last four characters.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"The CSV text, or an Excel file base64-encoded."},"side":{"type":"string","enum":["source","target","schedule","payment","custodian","posting"]},"format":{"type":"string","enum":["csv","xlsx"]},"recordType":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3},"dateOrder":{"type":"string","enum":["day_first","month_first"]},"columns":{"type":"object","additionalProperties":{"type":"string"},"description":"Which CSV column holds `date`, `amount`, `reference` and so on."}},"required":["content"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"rowCount":{"type":"integer"},"added":{"type":"integer"},"alreadyUploaded":{"type":"integer"},"problems":{"type":"array","items":{}},"message":{"type":"string"}},"required":["rowCount","added","alreadyUploaded","problems","message"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliations/{id}/sample":{"post":{"operationId":"loadContributionSample","tags":["Reconciliation"],"summary":"Load the pension sample","description":"Test mode only: loads synthetic files (three made-up employers over the last two months, with every kind of exception) into a contribution reconciliation.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The reconciliation id."},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"loaded":{"type":"object","additionalProperties":{"type":"integer"}},"periods":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}},"required":["loaded","periods","message"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-runs/{runId}":{"get":{"operationId":"getReconciliationRun","tags":["Reconciliation"],"summary":"Get a reconciliation run","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The run id."},"required":true,"name":"runId","in":"path"},{"schema":{"type":"string","description":"Only lines with this status."},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","description":"How many to return, up to 500. Default 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","description":"How many to skip."},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/ReconciliationRun"},"total":{"type":"integer"},"lines":{"type":"array","items":{"type":"object","properties":{}}}},"required":["run","total","lines"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review":{"get":{"operationId":"listReviewItems","tags":["Reconciliation"],"summary":"List items to review","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"`open` (default), `pending`, `done` or `all`."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only this reconciliation."},"required":false,"name":"reconciliationId","in":"query"},{"schema":{"type":"string","enum":["sandbox","production"],"description":"`sandbox` is Test mode; `production` is live."},"required":false,"name":"environment","in":"query"},{"schema":{"type":"integer","description":"How many to return, up to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","description":"How many to skip."},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationReviewItem"}}},"required":["total","items"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review/{itemId}":{"get":{"operationId":"getReviewItem","tags":["Reconciliation"],"summary":"Get an item to review","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The item id."},"required":true,"name":"itemId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ReconciliationReviewItem"},"actions":{"type":"object","properties":{}}},"required":["item","actions"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review/{itemId}/accept":{"post":{"operationId":"acceptReviewSuggestion","tags":["Reconciliation"],"summary":"Accept the suggested match","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The item id."},"required":true,"name":"itemId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500},"chosenExternalId":{"type":"string","maxLength":300,"description":"When several records could match, the one to match (one of the suggestion's externalIds). Required for those items."}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"matchId":{"type":"string"},"explanation":{"type":["string","null"]},"item":{"$ref":"#/components/schemas/ReconciliationReviewItem"}},"required":["matchId","explanation","item"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review/{itemId}/match":{"post":{"operationId":"matchReviewItem","tags":["Reconciliation"],"summary":"Match records by hand","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The item id."},"required":true,"name":"itemId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceExternalIds":{"type":"array","items":{"type":"string"},"maxItems":50},"targetExternalIds":{"type":"array","items":{"type":"string"},"maxItems":50},"note":{"type":"string","maxLength":500}},"required":["sourceExternalIds","targetExternalIds"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"matchId":{"type":"string"},"explanation":{"type":["string","null"]},"item":{"$ref":"#/components/schemas/ReconciliationReviewItem"}},"required":["matchId","explanation","item"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review/{itemId}/explain":{"post":{"operationId":"explainReviewItem","tags":["Reconciliation"],"summary":"Mark an item explained","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The item id."},"required":true,"name":"itemId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["known_fee","timing","not_from_this_provider","duplicate","rounding","other"]},"note":{"type":"string","maxLength":500,"description":"Required (3 or more characters) when the category is `other`."}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ReconciliationReviewItem"}},"required":["item"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review/{itemId}/reopen":{"post":{"operationId":"reopenReviewItem","tags":["Reconciliation"],"summary":"Reopen an item","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The item id."},"required":true,"name":"itemId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ReconciliationReviewItem"}},"required":["item"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-review/{itemId}/adjustment":{"post":{"operationId":"proposeReconciliationAdjustment","tags":["Reconciliation"],"summary":"Propose an adjustment","description":"Proposes a payment, fee or refund entry to fix a difference. It goes through approval before anything is written.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The item id."},"required":true,"name":"itemId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["record_payment","record_fee","record_refund","record_fx_difference"]},"values":{"type":"object","additionalProperties":{}},"reason":{"type":"string"}},"required":["kind","values","reason"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"actionId":{"type":["string","null"]},"summary":{"type":["string","null"]},"message":{"type":"string"}},"required":["status","actionId","summary","message"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/reconciliation-matches/{matchId}/undo":{"post":{"operationId":"undoReconciliationMatch","tags":["Reconciliation"],"summary":"Undo a match","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The match id."},"required":true,"name":"matchId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"matchId":{"type":"string"},"status":{"type":"string","enum":["undone"]}},"required":["matchId","status"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/contributions/{reconciliationId}/employers":{"get":{"operationId":"listContributionEmployers","tags":["Pensions"],"summary":"List employers with open contribution exceptions","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"A contribution reconciliation's id."},"required":true,"name":"reconciliationId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"employers":{"type":"array","items":{"type":"object","properties":{"employerKey":{"type":"string"},"employer":{"type":"string"},"open":{"type":"integer"}},"required":["employerKey","employer","open"]}}},"required":["employers"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/contributions/{reconciliationId}/statements":{"post":{"operationId":"createEmployerStatement","tags":["Pensions"],"summary":"Make an employer statement of discrepancies","description":"Puts every open exception for one employer on a statement that waits for a second person's approval before anything sends it. Members appear by the last four characters of their RSA PIN.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"A contribution reconciliation's id."},"required":true,"name":"reconciliationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employerKey":{"type":"string"},"note":{"type":"string","maxLength":1000}},"required":["employerKey"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending_approval"]}},"required":["id","status"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/packs":{"get":{"operationId":"listPensionPacks","tags":["Pensions"],"summary":"List the case packs","description":"The digital onboarding and benefit application packs: each checklist, the default timelines and how identity is checked.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"packs":{"type":"array","items":{"type":"object","properties":{}}},"timelines":{"type":"object","properties":{}},"identity":{"type":"object","properties":{}}},"required":["packs","timelines","identity"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/cases":{"get":{"operationId":"listPensionCases","tags":["Pensions"],"summary":"List pension cases","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"onboarding, retirement, withdrawal_25 or death_benefit."},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","description":"in_review, approved or returned."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only the case behind this evidence matrix."},"required":false,"name":"evidenceMatrixId","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cases":{"type":"array","items":{"$ref":"#/components/schemas/PensionCase"}}},"required":["cases"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"openPensionCase","tags":["Pensions"],"summary":"Open a case pack","description":"Documents are sent as their file name, size and SHA-256 fingerprint; the files stay with you. The identity check is recorded as its outcome, never the NIN. The evidence goes to a second person for review.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["onboarding","retirement","withdrawal_25","death_benefit"]},"reference":{"type":"string","minLength":3,"maxLength":80},"memberPin":{"type":"string","description":"Only its last four characters are kept."},"documents":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"fileName":{"type":"string"},"sha256":{"type":"string"},"sizeBytes":{"type":"integer"}},"required":["key","fileName","sha256"]}},"identityCheck":{"type":"object","properties":{"result":{"type":"string","enum":["matched","not_matched","could_not_check"]},"reference":{"type":"string"}},"required":["result"]},"notes":{"type":"object","additionalProperties":{"type":"string"}},"timelines":{"type":"object","properties":{"approveWorkingDays":{"type":"integer"},"payHours":{"type":"integer"},"submitWorkingDays":{"type":"integer"},"holidays":{"type":"array","items":{"type":"string"}}}}},"required":["kind","reference"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PensionCase"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/cases/{caseId}":{"get":{"operationId":"getPensionCase","tags":["Pensions"],"summary":"Get a pension case","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The case id."},"required":true,"name":"caseId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PensionCase"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/cases/{caseId}/decision":{"post":{"operationId":"decidePensionCase","tags":["Pensions"],"summary":"Approve a case pack or send it back","description":"A different member from the one who opened it decides. Approval opens the next obligation: payment, the Commission's approval, or the registration.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The case id."},"required":true,"name":"caseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string","maxLength":500}},"required":["decision"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PensionCase"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/cases/{caseId}/regulator-approval":{"post":{"operationId":"recordRegulatorApproval","tags":["Pensions"],"summary":"Record the Commission's approval","description":"For death benefit claims: after a person submits the claim and the Commission approves it, record its reference to start the payment clock.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The case id."},"required":true,"name":"caseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","maxLength":120}},"required":["reference"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PensionCase"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/cases/{caseId}/sealed-export":{"get":{"operationId":"exportSealedPensionCase","tags":["Pensions"],"summary":"Export a sealed case","description":"The evidence, each document's SHA-256, who opened, reviewed and decided the case with timestamps, and the IP address and device where captured, anchored to the governed evidence ledger and sealed with the SHA-256 of the body as canonical JSON.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The case id."},"required":true,"name":"caseId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"object","properties":{}},"seal":{"type":"object","properties":{"algorithm":{"type":"string","enum":["SHA-256"]},"sha256":{"type":"string"},"method":{"type":"string"}},"required":["algorithm","sha256","method"]}},"required":["body","seal"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/returns":{"get":{"operationId":"listPensionReturns","tags":["Pensions"],"summary":"List the returns calendar","description":"The returns your compliance team entered, as obligations. Nexra ships no dates of its own.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"returns":{"type":"array","items":{"type":"object","properties":{}}},"upcoming":{"type":"integer"}},"required":["returns","upcoming"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"addPensionReturn","tags":["Pensions"],"summary":"Add a return to the calendar","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"dueDate":{"type":"string"},"recurrence":{"type":"string","enum":["none","weekly","monthly","quarterly","yearly"]},"ownerUserId":{"type":"string"},"ownerTeam":{"type":"string"},"reminderLeadDays":{"type":"integer"},"note":{"type":"string"}},"required":["name","dueDate"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/pensions/returns/examples":{"post":{"operationId":"addPensionReturnExamples","tags":["Pensions"],"summary":"Add labelled examples to the calendar","description":"Three examples, each labelled as an example to rename and re-date with the deadline your compliance team confirms.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"},"returns":{"type":"array","items":{"type":"object","properties":{}}}},"required":["added","returns"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks/catalogue":{"get":{"operationId":"getEventCatalogue","tags":["Event webhooks"],"summary":"List the events you can receive","description":"Every event with a plain label, description and sample payload, grouped. The `webhooks` section of this document has each payload's schema.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{}}}},"required":["version","groups"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks":{"get":{"operationId":"listEventEndpoints","tags":["Event webhooks"],"summary":"List event endpoints","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"post":{"operationId":"createEventEndpoint","tags":["Event webhooks"],"summary":"Add an event endpoint","description":"Returns the signing secret once. Test endpoints receive Test mode events; live endpoints receive live events.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","maxLength":2048,"format":"uri","description":"An https URL on the public internet."},"mode":{"type":"string","enum":["test","live"]},"eventTypes":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30,"description":"Event types from the catalogue, for example `flow.run.failed`."}},"required":["name","url","eventTypes"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks/{endpointId}":{"patch":{"operationId":"updateEventEndpoint","tags":["Event webhooks"],"summary":"Change an event endpoint","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The endpoint id."},"required":true,"name":"endpointId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","maxLength":2048,"format":"uri"},"status":{"type":"string","enum":["active","disabled"]},"eventTypes":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30,"description":"Event types from the catalogue, for example `flow.run.failed`."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"disableEventEndpoint","tags":["Event webhooks"],"summary":"Turn an event endpoint off","description":"Queued deliveries to it are cancelled.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The endpoint id."},"required":true,"name":"endpointId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["disabled"]}},"required":["id","status"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks/{endpointId}/secret/rotate":{"post":{"operationId":"rotateEventEndpointSecret","tags":["Event webhooks"],"summary":"Rotate an endpoint's signing secret","description":"Returns the new secret once. The old secret stops working at once.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The endpoint id."},"required":true,"name":"endpointId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks/{endpointId}/test":{"post":{"operationId":"sendTestEvent","tags":["Event webhooks"],"summary":"Send a test event","description":"Sends `sandbox.test` to the endpoint.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The endpoint id."},"required":true,"name":"endpointId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks/{endpointId}/deliveries":{"get":{"operationId":"listEventDeliveries","tags":["Event webhooks"],"summary":"List an endpoint's deliveries","description":"The newest 100 deliveries with every attempt.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"The endpoint id."},"required":true,"name":"endpointId","in":"path"},{"schema":{"type":"string","description":"Only deliveries with this status, for example `failed`."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/event-webhooks/{endpointId}/deliveries/{deliveryId}/resend":{"post":{"operationId":"resendEventDelivery","tags":["Event webhooks"],"summary":"Send a delivery again","description":"Same event id, with a fresh set of attempts.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The endpoint id."},"required":true,"name":"endpointId","in":"path"},{"schema":{"type":"string","description":"The delivery id."},"required":true,"name":"deliveryId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/approvals":{"get":{"operationId":"listApprovals","tags":["Approvals"],"summary":"List approval requests","description":"Newest first, up to 100. Approvers see every request; others see their own.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"list","parameters":[{"schema":{"type":"string","description":"For example `pending`, `approved` or `rejected`."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Approval"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/approvals/{approvalId}/decision":{"post":{"operationId":"decideApproval","tags":["Approvals"],"summary":"Approve or reject a request","description":"You cannot approve your own request.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The approval id."},"required":true,"name":"approvalId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["decision","reason"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/approvals/{approvalId}/cancel":{"post":{"operationId":"cancelApproval","tags":["Approvals"],"summary":"Cancel your own request","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The approval id."},"required":true,"name":"approvalId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/approvals":{"get":{"operationId":"listGovernedApprovals","tags":["Approvals"],"summary":"List governed write approvals","description":"Approvals for writes to connected systems that a policy holds for review.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"cursor","parameters":[{"schema":{"type":"string","description":"For example `pending`."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only this connection."},"required":false,"name":"connectionId","in":"query"},{"schema":{"type":"string","description":"`R0` to `R4`."},"required":false,"name":"riskTier","in":"query"},{"schema":{"type":"string","description":"Text to look for."},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","description":"`nextCursor` from the previous page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernedApprovalPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/approvals/{approvalId}":{"get":{"operationId":"getGovernedApproval","tags":["Approvals"],"summary":"Get a governed write approval","description":"What would be written, why it was held, and the `binding.digest` to send back with your decision.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The approval id."},"required":true,"name":"approvalId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernedApproval"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/approvals/{approvalId}/decision":{"post":{"operationId":"decideGovernedApproval","tags":["Approvals"],"summary":"Decide a governed write approval","description":"`reviewedDigest` must equal the approval's `binding.digest`, so you decide exactly what you reviewed. A mismatch answers 409 `approval_digest_mismatch`.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The approval id."},"required":true,"name":"approvalId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reviewedDigest":{"type":"string"},"note":{"type":"string","maxLength":500,"description":"Required (3 or more characters) to reject."}},"required":["decision","reviewedDigest"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"approval":{"$ref":"#/components/schemas/GovernedApproval"},"resume":{}},"required":["approval"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/approvals/{approvalId}/request-again":{"post":{"operationId":"requestGovernedApprovalAgain","tags":["Approvals"],"summary":"Ask again after an approval expired","description":"When a governed write's approval expired before anyone decided, this retries the flow record so a new approval opens and the approvers are told again. Answers 409 when the approval has not expired or nothing waits on it any more.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The approval id."},"required":true,"name":"approvalId","in":"path"}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"approval":{"$ref":"#/components/schemas/GovernedApproval"},"resume":{}},"required":["approval"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/evidence":{"get":{"operationId":"listEvidence","tags":["Governance"],"summary":"List governance evidence","description":"The tamper-evident record of governed decisions and results, 50 per page.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"cursor","parameters":[{"schema":{"type":"string","description":"For example `decision` or `result`."},"required":false,"name":"eventType","in":"query"},{"schema":{"type":"string","description":"Only this action."},"required":false,"name":"actionId","in":"query"},{"schema":{"type":"string","description":"Only this connection."},"required":false,"name":"connectionId","in":"query"},{"schema":{"type":"string","description":"ISO date or time."},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","description":"ISO date or time."},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","description":"`nextCursor` from the previous page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/evidence/verify":{"get":{"operationId":"verifyEvidence","tags":["Governance"],"summary":"Verify the evidence chain","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"checked":{"type":"integer"},"brokenAtSequence":{"type":["integer","null"]},"verifiedAt":{"type":"string"}},"required":["valid","checked","brokenAtSequence","verifiedAt"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/evidence/export":{"get":{"operationId":"exportEvidence","tags":["Governance"],"summary":"Export evidence","description":"A JSON file of evidence entries with the hash chain, for auditors.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"ISO date or time."},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","description":"ISO date or time."},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string"},"exportedAt":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceEntry"}}},"required":["format","exportedAt","entries"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/measures":{"get":{"operationId":"getGovernanceMeasures","tags":["Governance"],"summary":"Get governance measures","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","enum":["7d","30d"]},"required":false,"name":"window","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"string"},"writes":{"type":"object","properties":{}},"approvals":{"type":"object","properties":{}}},"required":["window","writes","approvals"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/actions/{actionId}/timeline":{"get":{"operationId":"getActionTimeline","tags":["Governance"],"summary":"Get one action's timeline","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The action id."},"required":true,"name":"actionId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/policies":{"get":{"operationId":"listPolicies","tags":["Governance"],"summary":"List policies","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"cursor","parameters":[{"schema":{"type":"string","description":"Only this connection."},"required":false,"name":"connectionId","in":"query"},{"schema":{"type":"integer","description":"Up to 500."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` from the previous page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/principals":{"get":{"operationId":"listPrincipals","tags":["Governance"],"summary":"List who can be granted access","description":"Flows and app credentials that can be given write grants. No key material is returned.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"cursor","parameters":[{"schema":{"type":"string","description":"`flow`, `mcp_credential` or `api_credential`."},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","description":"Text to look for."},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","description":"Up to 500. Default 200."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` from the previous page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/grants":{"get":{"operationId":"listGrants","tags":["Governance"],"summary":"List access grants","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"cursor","parameters":[{"schema":{"type":"string","description":"`active`, `expired` or `revoked`."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Only this kind of principal."},"required":false,"name":"principalType","in":"query"},{"schema":{"type":"string","description":"Only this principal."},"required":false,"name":"principalId","in":"query"},{"schema":{"type":"string","description":"Only this connection."},"required":false,"name":"connectionId","in":"query"},{"schema":{"type":"integer","description":"Up to 500."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` from the previous page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/settings":{"get":{"operationId":"getGovernanceSettings","tags":["Governance"],"summary":"Get governance settings","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"requireGrantsForWrites":{"type":"boolean"},"singlePersonApproval":{"type":"boolean"}},"required":["requireGrantsForWrites","singlePersonApproval"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/connect/governance/decisions/explain":{"post":{"operationId":"explainDecision","tags":["Governance"],"summary":"Explain what a policy would decide","description":"Says whether a write would be allowed, held for approval or denied, and why. Nothing is written.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"operationKey":{"type":"string"},"input":{"type":"object","properties":{}},"principalType":{"type":"string"},"principalId":{"type":"string"}},"required":["connectionId","operationKey"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string"},"rule":{"type":["string","null"]},"reason":{"type":"string"}},"required":["decision","rule","reason"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/connect/v1/company/ask":{"post":{"operationId":"askCompanyData","tags":["Company data"],"summary":"Ask a question about company data","description":"Asks one question across the systems the signed-in person's read access group can read, and returns a cited answer. Read only: nothing can be created, changed, sent or paid. Every number is cited to a read or a calculation Nexra did in code, and uncited numbers are removed. Personal details are hidden when the group says so. Use an OAuth access token that acts for a person who signed in themselves (the same token as `/mcp`, with `company:read`); workspace API keys and client-credentials tokens get 403. Each person can ask 10 questions in 10 minutes across the console, MCP and this API, and every question is in the read access log with origin `api`.","security":[{"mcpOAuth":["company:read"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":1000},"groupId":{"type":"string","description":"Which of your read access groups to ask under. Defaults to your first."},"followUpOf":{"type":"string","description":"The `id` of your earlier answer this question follows up."}},"required":["question"],"example":{"question":"How much did we collect last week compared with the week before?"}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAnswer"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/connect/v1/company/leadership":{"get":{"operationId":"getLeadershipSummary","tags":["Company data"],"summary":"Get the Leadership summary","description":"Today's Leadership summary for a member of a read access group with Insights on: headcount and who's in today by team (counts only), cash in and out yesterday and over 14 days, and money Nexra moved yesterday. The same OAuth rules as asking: a person's own sign-in only. Every view is logged with origin `api`.","security":[{"mcpOAuth":["company:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadershipSummary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/public/connect/connectors":{"get":{"operationId":"listPublicConnectors","tags":["Catalogue"],"summary":"List connectors","description":"Every connector with its operations, authentication and limits. No sign-in needed.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"coverage":{"type":"object","properties":{}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/PublicConnector"}}},"required":["coverage","connectors"]}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/public/connect/connectors/{connectorKey}":{"get":{"operationId":"getPublicConnector","tags":["Catalogue"],"summary":"Get a connector","security":[],"parameters":[{"schema":{"type":"string","description":"The connector key."},"required":true,"name":"connectorKey","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConnector"}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/public/connect/coverage":{"get":{"operationId":"getConnectorCoverage","tags":["Catalogue"],"summary":"Get connector coverage","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/public/openapi.json":{"get":{"operationId":"getPlatformOpenApi","tags":["Catalogue"],"summary":"Get this API description","description":"This OpenAPI 3.1 document.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string"},"info":{"type":"object","properties":{}}},"required":["openapi","info"]}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/public/status/uptime":{"get":{"operationId":"getStatusUptime","tags":["Catalogue"],"summary":"Get uptime history","description":"Daily uptime for the last 90 days, measured by synthetic checks that run every minute outside the API. Only days with measurements are listed. No sign-in needed.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusUptime"}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/mcp":{"post":{"operationId":"mcpRequest","tags":["MCP"],"summary":"Send an MCP message","description":"The MCP Streamable HTTP endpoint. Send one JSON-RPC 2.0 message per request: `initialize`, then `tools/list` and `tools/call`. Published integrations appear as tools. MCP clients discover sign-in from `/.well-known/oauth-protected-resource/mcp`.","security":[{"mcpOAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The session id from the `initialize` answer. Required after initialising."},"required":false,"name":"Mcp-Session-Id","in":"header"},{"schema":{"type":"string","description":"The MCP protocol version you negotiated."},"required":false,"name":"MCP-Protocol-Version","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"202":{"description":"A notification or response was accepted; there is no answer body."},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"mcpEndSession","tags":["MCP"],"summary":"End an MCP session","security":[{"mcpOAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The session to end."},"required":true,"name":"Mcp-Session-Id","in":"header"}],"responses":{"204":{"description":"Success."},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"getMcpResourceMetadata","tags":["MCP"],"summary":"Get MCP sign-in metadata","description":"OAuth protected-resource metadata (RFC 9728) for the MCP endpoint: which authorisation server issues tokens and which scopes exist.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedResourceMetadata"}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getResourceMetadata","tags":["MCP"],"summary":"Get sign-in metadata","description":"The same metadata at the default location.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedResourceMetadata"}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/runs":{"post":{"operationId":"createResearchPlan","tags":["Research"],"summary":"Plan a research request","description":"Turns a question into a plan: the subjects found in the registries, the exact reads it will make, and the steps it will use. Nothing is read from filings and no steps are used until the plan is approved. Read-only: research never writes to a connected tool. Answers 404 until research is switched on for the workspace.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":2000},"depth":{"type":"string","enum":["standard","deep"],"description":"standard (25 steps) or deep (100 steps). Default standard."}},"required":["question"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRun"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"get":{"operationId":"listResearch","tags":["Research"],"summary":"List research briefs","description":"The signed-in person's research, newest first. Briefs are personal: other members don't see them.","security":[{"bearerAuth":[],"workspaceId":[]}],"x-nexra-pagination":"cursor","parameters":[{"schema":{"type":"integer","description":"1 to 50, default 20."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"The `nextCursor` from the previous page."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Only this status, for example `completed`."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{}}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/runs/{runId}":{"get":{"operationId":"getResearch","tags":["Research"],"summary":"Get research","description":"Status and progress while it runs (poll every few seconds); the validated brief once it has finished.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The run id."},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRun"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/runs/{runId}/plan":{"get":{"operationId":"getResearchPlan","tags":["Research"],"summary":"Get a research plan","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The run id."},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string"},"question":{"type":"string"},"plan":{"$ref":"#/components/schemas/ResearchPlan"}},"required":["runId","status","question","plan"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/runs/{runId}/approve":{"post":{"operationId":"approveResearchPlan","tags":["Research"],"summary":"Approve and run a plan","description":"Starts the approved plan as a background run. Optional edits: which reads stay on, and which candidate each ambiguous name is.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The run id."},"required":true,"name":"runId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"enabledReads":{"type":"array","items":{"type":"string"},"maxItems":200},"choices":{"type":"object","additionalProperties":{"type":"integer","minimum":-1},"description":"Subject key to candidate index; -1 leaves the subject out."}}}}}},"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ResearchRun"},{"type":"object","properties":{"pollAfterSeconds":{"type":"integer"}},"required":["pollAfterSeconds"]}]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/runs/{runId}/stop":{"post":{"operationId":"stopResearch","tags":["Research"],"summary":"Stop research","description":"A run that hasn't started is cancelled at once and uses no steps. A running one stops before its next read and uses only the share of reads that happened.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The run id."},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRun"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/runs/{runId}/check-claims":{"post":{"operationId":"checkResearchClaims","tags":["Research"],"summary":"Check text against a brief's facts","description":"Every number in the text must match a fact or calculation cited in the same sentence.","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The run id."},"required":true,"name":"runId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":20000}},"required":["text"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"claims":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"supported":{"type":"boolean"},"factIds":{"type":"array","items":{"type":"string"}},"reason":{"type":["string","null"]}},"required":["text","supported","factIds","reason"]}}},"required":["claims"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/sources":{"get":{"operationId":"listResearchSources","tags":["Research"],"summary":"List research sources","description":"The public sources with their shared limits and licences, and the person's connected tools with whether each is allowed.","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{}}}},"required":["sources"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/policy":{"get":{"operationId":"getResearchPolicy","tags":["Research"],"summary":"Get research source settings","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchSourcePolicy"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"put":{"operationId":"updateResearchPolicy","tags":["Research"],"summary":"Change research source settings","description":"Owners and admins only. Connected tools are off until allowed here.","security":[{"bearerAuth":[],"workspaceId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedPublicSources":{"type":"array","items":{"type":"string","enum":["sec-edgar","companies-house","gdelt","world-bank"]}},"allowedConnectionIds":{"type":"array","items":{"type":"string"},"maxItems":50},"maxReadsPerRun":{"type":"integer","minimum":1,"maximum":200},"retentionDays":{"anyOf":[{"type":"number","enum":[30]},{"type":"number","enum":[90]},{"type":"number","enum":[365]}]}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchSourcePolicy"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/assistants":{"get":{"operationId":"listResearchAssistants","tags":["Research"],"summary":"List connected AI assistants","description":"The person's AI assistants signed in to the personal MCP server (/mcp/pro).","security":[{"bearerAuth":[],"workspaceId":[]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"assistants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"redirectHost":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"connectedAt":{"type":"string","format":"date-time","description":"ISO 8601 date and time."},"lastUsedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date and time."}},"required":["id","name","redirectHost","scopes","connectedAt","lastUsedAt"]}}},"required":["assistants"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/api/console/research/assistants/{grantId}/disconnect":{"post":{"operationId":"disconnectResearchAssistant","tags":["Research"],"summary":"Disconnect an AI assistant","security":[{"bearerAuth":[],"workspaceId":[]}],"parameters":[{"schema":{"type":"string","description":"The grant id."},"required":true,"name":"grantId","in":"path"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"disconnected":{"type":"boolean"}},"required":["id","disconnected"]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/mcp/pro":{"post":{"operationId":"proMcpRequest","tags":["MCP"],"summary":"Send a message to the personal MCP server","description":"Nexra for Professionals over MCP (Streamable HTTP, one JSON-RPC message per request, no session). Read-only `desk_*` research tools plus `search` and `fetch`. Its own OAuth resource and audience: tokens for `/mcp` are refused here and the other way round. Scopes: `desk:research`, and `desk:work.read` for the person's own tools (asked for on first use with a 403 `insufficient_scope` challenge).","security":[{"mcpOAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"method":{"type":"string"},"params":{"type":"object","properties":{}}},"required":["jsonrpc","method"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"},{"type":"null"}]},"result":{},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"]}},"required":["jsonrpc","id"]}}}},"202":{"description":"A notification was accepted; there is no answer body."},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"operationId":"proMcpEndSession","tags":["MCP"],"summary":"End a personal MCP session","description":"The personal server keeps no session, so there is nothing to end; answers 204.","security":[],"responses":{"204":{"description":"Success."},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/.well-known/oauth-protected-resource/mcp/pro":{"get":{"operationId":"getProMcpResourceMetadata","tags":["MCP"],"summary":"Get personal MCP sign-in metadata","description":"OAuth protected-resource metadata (RFC 9728) for `/mcp/pro`: its own resource, Nexra's authorisation server and the two scopes.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string"},"authorization_servers":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"bearer_methods_supported":{"type":"array","items":{"type":"string"}},"resource_name":{"type":"string"}},"required":["resource","authorization_servers","scopes_supported","bearer_methods_supported","resource_name"]}}}},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}}},"webhooks":{"flow.run.succeeded":{"post":{"operationId":"event_flow_run_succeeded","tags":["Event webhooks"],"summary":"A flow run finished successfully","description":"Every record in the run went through. Group: Flow runs.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["flow.run.succeeded"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["succeeded","failed","partially_succeeded"]},"trigger":{"type":"string","maxLength":60},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0}},"required":["id","status","trigger","startedAt","completedAt","durationMs"],"additionalProperties":false},"flow":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"counts":{"type":"object","properties":{"received":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["received","succeeded","failed","skipped"],"additionalProperties":false},"reason":{"type":["object","null"],"properties":{"code":{"type":"string","maxLength":120},"message":{"type":"string","maxLength":500}},"required":["code","message"],"additionalProperties":false},"links":{"type":"object","properties":{"run":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["run"],"additionalProperties":false}},"required":["run","flow","integration","counts","reason","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"flow.run.succeeded","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"run":{"id":"cmexec01run","status":"succeeded","trigger":"schedule","startedAt":"2026-10-01T09:30:00.000Z","completedAt":"2026-10-01T09:31:12.000Z","durationMs":72000},"flow":{"id":"cmflow01orders","name":"Shopify orders to Xero invoices"},"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"counts":{"received":42,"succeeded":42,"failed":0,"skipped":0},"reason":null,"links":{"run":"https://console.example/dashboard/connect/runs/cmexec01run"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"flow.run.failed":{"post":{"operationId":"event_flow_run_failed","tags":["Event webhooks"],"summary":"A flow run failed","description":"The run stopped without sending its records. The reason says why. Group: Flow runs.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["flow.run.failed"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["succeeded","failed","partially_succeeded"]},"trigger":{"type":"string","maxLength":60},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0}},"required":["id","status","trigger","startedAt","completedAt","durationMs"],"additionalProperties":false},"flow":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"counts":{"type":"object","properties":{"received":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["received","succeeded","failed","skipped"],"additionalProperties":false},"reason":{"type":["object","null"],"properties":{"code":{"type":"string","maxLength":120},"message":{"type":"string","maxLength":500}},"required":["code","message"],"additionalProperties":false},"links":{"type":"object","properties":{"run":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["run"],"additionalProperties":false}},"required":["run","flow","integration","counts","reason","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"flow.run.failed","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"run":{"id":"cmexec01run","status":"failed","trigger":"schedule","startedAt":"2026-10-01T09:30:00.000Z","completedAt":"2026-10-01T09:31:12.000Z","durationMs":72000},"flow":{"id":"cmflow01orders","name":"Shopify orders to Xero invoices"},"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"counts":{"received":42,"succeeded":0,"failed":42,"skipped":0},"reason":{"code":"run_deadline_exceeded","message":"The run reached its 60-minute time limit, so Nexra stopped it before sending more."},"links":{"run":"https://console.example/dashboard/connect/runs/cmexec01run"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"flow.run.partially_succeeded":{"post":{"operationId":"event_flow_run_partially_succeeded","tags":["Event webhooks"],"summary":"A flow run finished with some records needing attention","description":"Most records went through; the rest are waiting for review. Group: Flow runs.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["flow.run.partially_succeeded"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["succeeded","failed","partially_succeeded"]},"trigger":{"type":"string","maxLength":60},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"},"durationMs":{"type":["integer","null"],"minimum":0}},"required":["id","status","trigger","startedAt","completedAt","durationMs"],"additionalProperties":false},"flow":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"counts":{"type":"object","properties":{"received":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["received","succeeded","failed","skipped"],"additionalProperties":false},"reason":{"type":["object","null"],"properties":{"code":{"type":"string","maxLength":120},"message":{"type":"string","maxLength":500}},"required":["code","message"],"additionalProperties":false},"links":{"type":"object","properties":{"run":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["run"],"additionalProperties":false}},"required":["run","flow","integration","counts","reason","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"flow.run.partially_succeeded","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"run":{"id":"cmexec01run","status":"partially_succeeded","trigger":"schedule","startedAt":"2026-10-01T09:30:00.000Z","completedAt":"2026-10-01T09:31:12.000Z","durationMs":72000},"flow":{"id":"cmflow01orders","name":"Shopify orders to Xero invoices"},"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"counts":{"received":42,"succeeded":39,"failed":3,"skipped":0},"reason":null,"links":{"run":"https://console.example/dashboard/connect/runs/cmexec01run"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"record.dead_lettered":{"post":{"operationId":"event_record_dead_lettered","tags":["Event webhooks"],"summary":"A record needs attention","description":"A record stopped at a step and is waiting in the review list. Group: Flow runs.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["record.dead_lettered"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"deadLetter":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","maxLength":60}},"required":["id","status"],"additionalProperties":false},"record":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"flow":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"step":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"error":{"type":["object","null"],"properties":{"code":{"type":"string","maxLength":120},"category":{"type":"string","maxLength":60},"retryable":{"type":"boolean"}},"required":["code","category","retryable"],"additionalProperties":false},"links":{"type":"object","properties":{"deadLetters":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"},"run":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["deadLetters","run"],"additionalProperties":false}},"required":["deadLetter","record","run","flow","step","error","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"record.dead_lettered","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"deadLetter":{"id":"cmdl01","status":"open"},"record":{"id":"cmrec01"},"run":{"id":"cmexec01run"},"flow":{"id":"cmflow01orders","name":"Shopify orders to Xero invoices"},"step":{"id":"cmstep01","name":"Create invoice"},"error":{"code":"validation_failed","category":"validation","retryable":false},"links":{"deadLetters":"https://console.example/dashboard/connect/dead-letter","run":"https://console.example/dashboard/connect/runs/cmexec01run"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"approval.requested":{"post":{"operationId":"event_approval_requested","tags":["Event webhooks"],"summary":"An approval was requested","description":"A change is waiting for someone with the right role to approve it. Group: Approvals.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["approval.requested"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"approval":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"action":{"type":"string","maxLength":160},"resourceType":{"type":"string","maxLength":60},"environment":{"type":"string","maxLength":30},"requiredApprovals":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending"]},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","action","resourceType","environment","requiredApprovals","status","expiresAt"],"additionalProperties":false},"requestedBy":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"links":{"type":"object","properties":{"approval":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["approval"],"additionalProperties":false}},"required":["approval","requestedBy","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"approval.requested","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"approval":{"id":"approval_01","action":"xero.invoices.create","resourceType":"connector_action","environment":"production","requiredApprovals":1,"status":"pending","expiresAt":"2026-10-01T10:00:00.000Z"},"requestedBy":{"id":"cmuser01"},"links":{"approval":"https://console.example/dashboard/approvals"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"approval.decided":{"post":{"operationId":"event_approval_decided","tags":["Event webhooks"],"summary":"An approval was decided","description":"Someone approved or rejected a waiting change. Group: Approvals.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["approval.decided"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"approval":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"action":{"type":"string","maxLength":160},"resourceType":{"type":"string","maxLength":60},"environment":{"type":"string","maxLength":30},"requiredApprovals":{"type":"integer","minimum":0},"status":{"type":"string","enum":["approved","rejected"]},"decidedAt":{"type":"string","format":"date-time"}},"required":["id","action","resourceType","environment","requiredApprovals","status","decidedAt"],"additionalProperties":false},"decidedBy":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"links":{"type":"object","properties":{"approval":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["approval"],"additionalProperties":false}},"required":["approval","decidedBy","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"approval.decided","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"approval":{"id":"approval_01","action":"xero.invoices.create","resourceType":"connector_action","environment":"production","requiredApprovals":1,"status":"approved","decidedAt":"2026-10-01T09:31:12.000Z"},"decidedBy":{"id":"cmuser02"},"links":{"approval":"https://console.example/dashboard/approvals"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"connection.health_changed":{"post":{"operationId":"event_connection_health_changed","tags":["Event webhooks"],"summary":"A connection's health changed","description":"A connection became healthy, or stopped working (for example it needs reconnecting). Group: App connections.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["connection.health_changed"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"connection":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300},"provider":{"type":"string","maxLength":120}},"required":["id","name","provider"],"additionalProperties":false},"previousStatus":{"type":["string","null"],"maxLength":60},"status":{"type":"string","maxLength":60},"links":{"type":"object","properties":{"connection":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["connection"],"additionalProperties":false}},"required":["connection","previousStatus","status","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"connection.health_changed","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"connection":{"id":"cmconn01","name":"Xero (accounts)","provider":"xero"},"previousStatus":"healthy","status":"needs_reconnect","links":{"connection":"https://console.example/dashboard/connect/connections"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"connection.live_check.failed":{"post":{"operationId":"event_connection_live_check_failed","tags":["Event webhooks"],"summary":"A live connection check failed","description":"Nexra checked a connection against your real app and something did not work. Group: App connections.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["connection.live_check.failed"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"connection":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300},"provider":{"type":"string","maxLength":120}},"required":["id","name","provider"],"additionalProperties":false},"check":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","maxLength":60},"failedChecks":{"type":"integer","minimum":0},"totalChecks":{"type":"integer","minimum":0},"reason":{"type":["object","null"],"properties":{"code":{"type":"string","maxLength":120},"message":{"type":"string","maxLength":500}},"required":["code","message"],"additionalProperties":false}},"required":["id","status","failedChecks","totalChecks","reason"],"additionalProperties":false},"links":{"type":"object","properties":{"connection":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["connection"],"additionalProperties":false}},"required":["connection","check","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"connection.live_check.failed","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"connection":{"id":"cmconn01","name":"Xero (accounts)","provider":"xero"},"check":{"id":"cmcheck01","status":"failed","failedChecks":1,"totalChecks":1,"reason":{"code":"permission","message":"The app did not allow Nexra to read invoices."}},"links":{"connection":"https://console.example/dashboard/connect/connections"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"integration.paused":{"post":{"operationId":"event_integration_paused","tags":["Event webhooks"],"summary":"An integration was paused","description":"No new runs start until someone resumes it. Group: Integrations.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["integration.paused"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"actor":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"runsStopped":{"type":"integer","minimum":0},"links":{"type":"object","properties":{"integration":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["integration"],"additionalProperties":false}},"required":["integration","actor","runsStopped","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"integration.paused","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"actor":{"id":"cmuser01"},"runsStopped":2,"links":{"integration":"https://console.example/dashboard/connect/integrations/cmint01shop"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"integration.resumed":{"post":{"operationId":"event_integration_resumed","tags":["Event webhooks"],"summary":"An integration was resumed","description":"Its flows run again on their schedules and triggers. Group: Integrations.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["integration.resumed"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"actor":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"runsStopped":{"type":"integer","minimum":0},"links":{"type":"object","properties":{"integration":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["integration"],"additionalProperties":false}},"required":["integration","actor","runsStopped","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"integration.resumed","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"actor":{"id":"cmuser01"},"runsStopped":0,"links":{"integration":"https://console.example/dashboard/connect/integrations/cmint01shop"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"integration.suspended":{"post":{"operationId":"event_integration_suspended","tags":["Event webhooks"],"summary":"An integration was suspended","description":"Nothing runs until a workspace owner or admin lifts the suspension. Group: Integrations.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["integration.suspended"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"actor":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"runsStopped":{"type":"integer","minimum":0},"links":{"type":"object","properties":{"integration":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["integration"],"additionalProperties":false}},"required":["integration","actor","runsStopped","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"integration.suspended","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"actor":{"id":"cmuser01"},"runsStopped":1,"links":{"integration":"https://console.example/dashboard/connect/integrations/cmint01shop"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"integration.deleted":{"post":{"operationId":"event_integration_deleted","tags":["Event webhooks"],"summary":"An integration was deleted","description":"It stops running and can be restored for 30 days. Group: Integrations.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["integration.deleted"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"actor":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"runsStopped":{"type":"integer","minimum":0},"links":{"type":"object","properties":{"integration":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["integration"],"additionalProperties":false}},"required":["integration","actor","runsStopped","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"integration.deleted","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"actor":{"id":"cmuser01"},"runsStopped":0,"links":{"integration":"https://console.example/dashboard/connect/recently-deleted"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"reconciliation.run.completed":{"post":{"operationId":"event_reconciliation_run_completed","tags":["Event webhooks"],"summary":"A reconciliation finished","description":"Nexra compared the two sides and counted what matched and what needs review. Group: Reconciliation.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["reconciliation.run.completed"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"reconciliation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","maxLength":60},"trigger":{"type":"string","maxLength":60},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","status","trigger","startedAt","completedAt"],"additionalProperties":false},"counts":{"type":"object","properties":{"sourceRecords":{"type":"integer","minimum":0},"targetRecords":{"type":"integer","minimum":0},"matched":{"type":"integer","minimum":0},"needsReview":{"type":"integer","minimum":0}},"required":["sourceRecords","targetRecords","matched","needsReview"],"additionalProperties":false},"links":{"type":"object","properties":{"run":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["run"],"additionalProperties":false}},"required":["reconciliation","run","counts","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"reconciliation.run.completed","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"reconciliation":{"id":"cmrecon01","name":"Stripe payouts against Xero"},"run":{"id":"cmreconrun01","status":"completed","trigger":"schedule","startedAt":"2026-10-01T09:30:00.000Z","completedAt":"2026-10-01T09:31:12.000Z"},"counts":{"sourceRecords":120,"targetRecords":118,"matched":116,"needsReview":4},"links":{"run":"https://console.example/dashboard/connect/reconciliation/runs/cmreconrun01"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"reconciliation.item.needs_review":{"post":{"operationId":"event_reconciliation_item_needs_review","tags":["Event webhooks"],"summary":"A reconciliation item needs review","description":"Something did not match and is waiting in the review list. Group: Reconciliation.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["reconciliation.item.needs_review"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"reconciliation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"item":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","maxLength":60},"status":{"type":"string","maxLength":60}},"required":["id","kind","status"],"additionalProperties":false},"run":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"links":{"type":"object","properties":{"review":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["review"],"additionalProperties":false}},"required":["reconciliation","item","run","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"reconciliation.item.needs_review","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"reconciliation":{"id":"cmrecon01","name":"Stripe payouts against Xero"},"item":{"id":"cmitem01","kind":"unmatched_source","status":"open"},"run":{"id":"cmreconrun01"},"links":{"review":"https://console.example/dashboard/connect/reconciliation/review/cmitem01"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"go_live.completed":{"post":{"operationId":"event_go_live_completed","tags":["Event webhooks"],"summary":"A flow went live","description":"The flow now runs against your real (live) apps. Group: Going live.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["go_live.completed"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"flow":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":["string","null"],"maxLength":300}},"required":["id","name"],"additionalProperties":false},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"version":{"type":["integer","null"],"minimum":0}},"required":["id","version"],"additionalProperties":false},"approvedBy":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"],"additionalProperties":false},"links":{"type":"object","properties":{"flow":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["flow"],"additionalProperties":false}},"required":["flow","integration","revision","approvedBy","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"go_live.completed","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"live","workspaceId":"cmworkspace01","data":{"flow":{"id":"cmflow01orders","name":"Shopify orders to Xero invoices"},"integration":{"id":"cmint01shop","name":"Online shop to accounts"},"revision":{"id":"cmrev01","version":3},"approvedBy":{"id":"cmuser02"},"links":{"flow":"https://console.example/dashboard/connect/flows/cmflow01orders"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"obligation.due_soon":{"post":{"operationId":"event_obligation_due_soon","tags":["Event webhooks"],"summary":"An obligation is due soon","description":"Sent once for each due date when an open obligation comes within its reminder time (14 days unless you change it). Group: Obligations.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["obligation.due_soon"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"obligation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"reference":{"type":"string","maxLength":200},"counterparty":{"type":"string","maxLength":200},"sourceClause":{"type":["string","null"],"maxLength":200},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurrence":{"type":"string","enum":["none","weekly","monthly","quarterly","yearly"]},"reminderLeadDays":{"type":"integer","minimum":1,"maximum":365}},"required":["id","reference","counterparty","sourceClause","dueDate","recurrence","reminderLeadDays"],"additionalProperties":false},"reminder":{"type":"object","properties":{"kind":{"type":"string","enum":["due_soon","overdue"]},"summary":{"type":"string","maxLength":600}},"required":["kind","summary"],"additionalProperties":false},"links":{"type":"object","properties":{"obligation":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["obligation"],"additionalProperties":false}},"required":["obligation","reminder","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"obligation.due_soon","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"obligation":{"id":"obl_01","reference":"Gas supply agreement GSA-2024-07","counterparty":"Northfield Power","sourceClause":"7.2","dueDate":"2026-10-31","recurrence":"monthly","reminderLeadDays":14},"reminder":{"kind":"due_soon","summary":"Send the monthly volume statement (Gas supply agreement GSA-2024-07, Northfield Power) is due in 14 days, on 31 October 2026."},"links":{"obligation":"https://console.example/dashboard/connect/obligations/obl_01"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"obligation.overdue":{"post":{"operationId":"event_obligation_overdue","tags":["Event webhooks"],"summary":"An obligation is overdue","description":"Sent once for each due date when an open obligation passes it without being marked done. Group: Obligations.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["obligation.overdue"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"obligation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"reference":{"type":"string","maxLength":200},"counterparty":{"type":"string","maxLength":200},"sourceClause":{"type":["string","null"],"maxLength":200},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurrence":{"type":"string","enum":["none","weekly","monthly","quarterly","yearly"]},"reminderLeadDays":{"type":"integer","minimum":1,"maximum":365}},"required":["id","reference","counterparty","sourceClause","dueDate","recurrence","reminderLeadDays"],"additionalProperties":false},"reminder":{"type":"object","properties":{"kind":{"type":"string","enum":["due_soon","overdue"]},"summary":{"type":"string","maxLength":600}},"required":["kind","summary"],"additionalProperties":false},"links":{"type":"object","properties":{"obligation":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["obligation"],"additionalProperties":false}},"required":["obligation","reminder","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"obligation.overdue","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"obligation":{"id":"obl_01","reference":"Gas supply agreement GSA-2024-07","counterparty":"Northfield Power","sourceClause":"7.2","dueDate":"2026-10-31","recurrence":"monthly","reminderLeadDays":14},"reminder":{"kind":"overdue","summary":"Send the monthly volume statement (Gas supply agreement GSA-2024-07, Northfield Power) was due on 31 October 2026, 2 days ago."},"links":{"obligation":"https://console.example/dashboard/connect/obligations/obl_01"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"workspace.daily_digest":{"post":{"operationId":"event_workspace_daily_digest","tags":["Event webhooks"],"summary":"The daily workspace digest","description":"Sent once a day at 07:00 UTC: runs, connections needing attention, waiting approvals and review items, usage and changes from the last 24 hours. Group: Workspace.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["workspace.daily_digest"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"digest":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"windowStart":{"type":"string","format":"date-time"},"windowEnd":{"type":"string","format":"date-time"},"quiet":{"type":"boolean"},"headline":{"type":"string","maxLength":300}},"required":["id","date","windowStart","windowEnd","quiet","headline"],"additionalProperties":false},"counts":{"type":"object","properties":{"runsCompleted":{"type":"integer","minimum":0},"runsFailed":{"type":"integer","minimum":0},"runsPartlyCompleted":{"type":"integer","minimum":0},"connectionsNeedingAttention":{"type":"integer","minimum":0},"approvalsWaiting":{"type":"integer","minimum":0},"reconciliationItemsToReview":{"type":"integer","minimum":0},"recordsNeedingAttention":{"type":"integer","minimum":0},"flowsPausedOrSuspended":{"type":"integer","minimum":0},"flowsPublished":{"type":"integer","minimum":0},"connectionsAdded":{"type":"integer","minimum":0},"obligationsDueSoon":{"type":"integer","minimum":0},"obligationsOverdue":{"type":"integer","minimum":0},"pensionExceptions":{"type":"integer","minimum":0},"pensionCasesInReview":{"type":"integer","minimum":0}},"required":["runsCompleted","runsFailed","runsPartlyCompleted","connectionsNeedingAttention","approvalsWaiting","reconciliationItemsToReview","recordsNeedingAttention","flowsPausedOrSuspended","flowsPublished","connectionsAdded","obligationsDueSoon","obligationsOverdue","pensionExceptions","pensionCasesInReview"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["runs","connections","approvals","reconciliation","deadLetters","pausedFlows","usage","obligations","pensions","changes","money"]},"title":{"type":"string","maxLength":120},"summary":{"type":"string","maxLength":500},"items":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":600},"link":{"type":["string","null"],"maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["text","link"],"additionalProperties":false},"maxItems":10}},"required":["key","title","summary","items"],"additionalProperties":false},"maxItems":10},"links":{"type":"object","properties":{"digest":{"type":"string","maxLength":1000,"pattern":"^(https:\\/\\/[A-Za-z0-9.-]+(:\\d+)?|http:\\/\\/localhost(:\\d+)?)?\\/dashboard\\/[A-Za-z0-9/_-]*$"}},"required":["digest"],"additionalProperties":false}},"required":["digest","counts","sections","links"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"workspace.daily_digest","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"digest":{"id":"digest_01","date":"2026-10-01","windowStart":"2026-09-30T07:00:00.000Z","windowEnd":"2026-10-01T07:00:00.000Z","quiet":false,"headline":"2 things need your attention."},"counts":{"runsCompleted":42,"runsFailed":2,"runsPartlyCompleted":0,"connectionsNeedingAttention":1,"approvalsWaiting":0,"reconciliationItemsToReview":0,"recordsNeedingAttention":0,"flowsPausedOrSuspended":0,"flowsPublished":1,"connectionsAdded":0,"obligationsDueSoon":0,"obligationsOverdue":0,"pensionExceptions":0,"pensionCasesInReview":0},"sections":[{"key":"runs","title":"Runs","summary":"42 runs completed and 2 failed.","items":[{"text":"Shopify orders to Xero invoices failed twice. The app did not answer in time.","link":"https://console.example/dashboard/connect/runs/cmexec01run"}]},{"key":"connections","title":"Connections","summary":"1 connection needs attention.","items":[{"text":"Xero (accounts) needs reconnecting.","link":"https://console.example/dashboard/connect/connections"}]},{"key":"changes","title":"Changes","summary":"1 flow was published.","items":[{"text":"Shopify orders to Xero invoices was published.","link":"https://console.example/dashboard/connect/flows/cmflow01orders"}]}],"links":{"digest":"https://console.example/dashboard/"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}},"sandbox.test":{"post":{"operationId":"event_sandbox_test","tags":["Event webhooks"],"summary":"Test event","description":"Sent when you press Send a test event. Sent when you choose **Send a test event**; it is always delivered and cannot be chosen.","parameters":[{"schema":{"type":"string","description":"The event type."},"required":true,"name":"X-Amakora-Event","in":"header"},{"schema":{"type":"string","description":"The envelope `id`."},"required":true,"name":"X-Amakora-Event-Id","in":"header"},{"schema":{"type":"string","description":"This delivery. Differs per endpoint."},"required":true,"name":"X-Amakora-Delivery-Id","in":"header"},{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `<t>.<raw body>`, keyed with the endpoint's signing secret. Reject timestamps more than 5 minutes old."},"required":true,"name":"X-Amakora-Signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id. The same for every endpoint and across retries, so you can de-duplicate on it."},"type":{"type":"string","enum":["sandbox.test"]},"version":{"type":"string","enum":["2026-10-01"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened."},"mode":{"type":"string","enum":["test","live"],"description":"Test events come from Test mode activity; live events from live activity."},"workspaceId":{"type":"string"},"data":{"type":"object","properties":{"message":{"type":"string","maxLength":300},"endpoint":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","maxLength":300}},"required":["id","name"],"additionalProperties":false}},"required":["message","endpoint"],"additionalProperties":false}},"required":["id","type","version","createdAt","mode","workspaceId","data"],"example":{"id":"evt_3f9a1c2b7d4e5f60718293a4","type":"sandbox.test","version":"2026-10-01","createdAt":"2026-10-01T09:31:12.000Z","mode":"test","workspaceId":"cmworkspace01","data":{"message":"This is a test event from Nexra. Your endpoint received it.","endpoint":{"id":"wh_01","name":"Order system"}}}}}}},"responses":{"200":{"description":"Answer with any 2xx within 8 seconds. Other answers and timeouts are retried with backoff, then the delivery is dead-lettered."}}}}}}