Sessions

List pending session elicitations

Changed on

Returns the permission prompts (including spec approvals) and AskUser questions the session is waiting on. Each item carries the same fields the SDK permissionHandler and askUserHandler receive, plus the requestId to answer it with, and a permission prompt lists only the options the answer endpoint accepts. Items use these SDK shapes, not the MCP elicitation JSON Schema form. Option pickers (pick_options requests) are not covered, and neither are queued AskUser questions (blocking: false, which the agent does not wait on); answer those in the Factory desktop app, web app or CLI. This feature is enabled for selected organizations only.

get/api/v0/sessions/{sessionId}/elicitations

Request

  • Base URL
    https://api.factory.ai
  • Auth
    HTTP bearer

Path parameters

sessionId, string required

Session ID

Headers

X-Factory-Org-Id, string

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Response

Response for status 200

ListSessionElicitations200ResponseBody required
elicitations, union[] required

Permission prompts and AskUser questions the session is waiting on. Queued AskUser questions, which the agent does not wait on, are not listed.

Changes

    • info

      added the non-success response with the status

    • info

      added the optional property elicitations/items/anyOf[subschema #1]/toolUses/items/toolUse/scriptExecution/site to the response with the status

    • info

      added the optional property elicitations/items/anyOf[subschema #1]/toolUses/items/toolUse/scriptExecution/step to the response with the status