Operations
Get Operation
Read an operation’s status and result. Optionally wait for it to finish.
GET
Preview. This endpoint is available to organisations in the Wordsmith MCP and files pilot. Other organisations receive
403 mcp_not_enabled. See the preview overview.wait, holds the request until the operation finishes or wait seconds pass, whichever comes first. A long-poll with wait=20 replaces about ten short polls and never runs past the 29-second request limit.
Every endpoint that starts long-running work returns an operation. Its type says what the work is:
Authentication
Send an API key, or an OAuth access token, as a bearer token in theAuthorization header. A token needs the read scope of the operation’s type, from the table above, such as sessions:read for a question. Without it the call returns 403 with "error": "insufficient_scope" and a WWW-Authenticate header naming the scope.
Path parameters
string
required
The operation id returned when the work was started.
Query parameters
integer
default:"0"
Seconds to wait for the operation to finish, from
0 to 20. The response comes back as soon as it finishes. When your organisation already has many requests waiting, the response comes back at once; ask again after poll_after_seconds.Response
Returns200 with the operation, whether or not it has finished. queued and running mean ask again after poll_after_seconds. When status is succeeded, result holds the fields the table above lists for the operation’s type. For a question, that is its question_id, session_id, status, answer, reason and attachments (file ids).
resource.id is null until the work has created its resource, such as the session a draft runs in. Numbers in result and progress are JSON numbers. A finished operation keeps its last progress.