Ask a running draft turn to stop
Stop the caller's draft turn: it makes no further model calls and its stream ends with end. The id is the turn_id the stream request sent, or the stream's first event (turn). A stop that arrives before the turn has started stops it as soon as it does. The stop is kept under the caller's name, so it never reaches another user's turn. Answers 202 once the request is stored, whether or not the caller has such a turn.
Args:
turn_id: The id the stream request sent, or the one its turn event carried.
Returns: 202 when the stop was stored, 404 for a malformed id, 503 without Redis.
Not available to personal access tokens; call it from a signed-in session.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
turn_id*stringThe stop was requested
curl -X POST 'http://localhost:7091/api/drafter/turns/string/cancel'Stream one draft turn POST
Run one draft turn and stream it as server-sent events (data: <json>). Events: turn (first, {"id"}: the id POST /api/drafter/turns/<id>/cancel stops, the request's turn_id when it sent a valid one; absent when the server can't stop turns), status, read (what a read tool showed the model, {"kind": "questions", "items"}), message, questions, proposal, error, and end (always last). Refusals (disabled, no_model, rate_limited, quota, bad_request) arrive as an error event in a 200 stream; a bad_request carries reason: history (the conversation is refused: start a new one), too_long (the prompt is over the read cap, with limit), empty (the message is empty once cleaned) or invalid. Nothing is saved. Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.
Delete a folder DELETE
Delete a folder. Its folders and items move to its parent (the top level and unfiled when it had none); a child folder whose name is taken there gets a " (n)" suffix; agents reading it live lose it. A team's folder needs the Editor role there. Answers {success, moved_items, moved_folders, renamed: [{id, from, to}]}. [Personal access token](/API/personal-access-tokens) scope: `agents:write` or `prompts:write` or `sources:write` or `tools:write`.