Buni.aiDocs
API referenceInvocations

Get an invocation

Returns the status, result and step trace of one run. Secrets in payloads and traces are redacted.

GET/external-invocations/{invocationId}

Returns the status, result and step trace of one run. Secrets in payloads and traces are redacted.

Call it with the same token that started the run; another token, even with the right scope, returns 403 Token does not match invocation. The token needs the scope of the run's target: bot:invoke for bot runs, flow:trigger for flow runs, automation:trigger for automation runs.

Authorization

AuthorizationBearer <token>

Authorization: Bearer bai_ext_.... Tokens belong to one project and carry scopes: bot:invoke, flow:trigger, automation:trigger.

In: header

Scope: bot:invoke

Path Parameters

invocationId*string

The invocationId returned when the run was started.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/external-invocations/string"

{  "invocationId": "clx9kf3a20010ab12cd34ef20",  "status": "SUCCEEDED",  "environment": "PRODUCTION",  "triggerSource": "WEBHOOK",  "mode": "ASYNC",  "targetType": "AUTOMATION",  "startedAt": "2026-09-24T10:00:01.120Z",  "completedAt": "2026-09-24T10:00:02.480Z",  "durationMs": 1360,  "errorMessage": null,  "requestPayload": {    "event": "order.paid",    "payload": {      "orderId": "ORD-10442"    }  },  "result": {    "success": true  },  "trace": {    "runtime": "automation"  },  "steps": [],  "callbackAttempts": [],  "scheduledFor": null,  "schedulerStatus": null,  "schedulerJobName": null,  "pendingApproval": null,  "createdAt": "2026-09-24T10:00:00.980Z",  "updatedAt": "2026-09-24T10:00:02.480Z"}