Skip to main content
An Ask can pause after a paid search because several companies match. Select the intended company on that same run. Apiosk retains the paid search, the original quote and its approval, and resumes the remaining work.
Requires ask:execute and the same API key that created the task. Idempotency-Key is required: use a new key for each choice or supplied input, and keep it unchanged on transport retries.

Read the current continuation

POST /v2/ask, POST /v2/asks/{id}/run and GET /v2/runs/{id} return continuation when the task has a supported action:
  • select_entity: choose an entity_ref from the returned candidates.
  • supply_input: provide value matching the returned input_schema.
continuation.state is a signed snapshot. Copy the entire object unchanged; do not construct its fields. continuation.actions supplies the action ID, label and input schema. Never choose a company by array position alone.

Select a company

The following uses the saved response run and an entityRef selected by the caller from its candidates. Keep body and idempotencyKey for retries.
For a supply_input action, send input: { value: suppliedValue }. The value can be a string, number or other type specified by its schema.

Approval and recovery

The response is the usual run object, with the same id, saved results and cumulative usage. 202 means the worker is still running; poll GET /v2/runs/{id}. A successful selection under a valid approval needs no second /run call. The endpoint cannot approve a plan or raise a budget. If supplied input produces a new quote, the response is requires_approval. Review its ceiling and call /run explicitly. An expired original quote is refused with 409 plan_expired; its saved results remain readable. After a timeout, retry the exact same state, action, input and Idempotency-Key. Even after the action was consumed, its saved receipt returns the current run without selecting or buying twice. limit and wait_seconds only affect presentation and may change between retries. After 409 continuation_changed, read the run again. If it still offers an action, review it and submit its current state with a new idempotency key. Do not start a replacement Ask to recover an uncertain continuation. Natural-language clarifications without a continuation and document uploads are outside this endpoint. See Ask.

Status codes