Skip to navigation

Poll the state

View as Markdown

The state of an execution as an HTTP code, with no body. The cheapest way to poll, and the one to put in a loop.

CodeMeaningWhat to do
200Finished. Nothing about it will change.Read the results, or the state if you want to know how it went.
202Still working.Ask again later.
423Waiting for an answer from your customer.Fetch the state for the form, then reply to Resume an Execution.
404No such execution for your application.Check the id — a deleted execution answers the same way.

No answer from this endpoint has a body — not the 200, not the 404. HEAD returns headers only, by definition, so the status line is the answer and there is nothing to parse. Whatever example a client library prints for an empty response, the socket carries no bytes.

200 does not mean successful, it means closed. A failed execution is finished too, and this endpoint cannot tell you which it was: the reason lives in the state. Branch on status_reason, never on the fact that the poll stopped returning 202.

Poll politely, or stop polling. An engine that talks to a bank takes tens of seconds, not milliseconds — a few seconds between checks is plenty. Webhooks replace the loop entirely, and the ended event is the only one you have to handle.

Server to server only. This call is authorised with your application secret: it belongs in your backend, never in a browser, a mobile app or anything your customer can read.

Authentication

X-APP-SECRETstring
Application Secret

Path parameters

execution_idstringRequiredformat: "object-id"
The execution, as the acceptance response returned it.

Response

200 OK
Closed, not necessarily successful. The execution is over and nothing about it will change; whether it produced anything is in status_reason, which this answer does not carry. Read the state or go straight to the results.

Errors

404
Not Found Error
422
Unprocessable Entity Error
423
Locked Error