--- title: Session Run Tool Response | Luma Agents --- POST /v1/sessions/{session\_id}/runs/{run\_id}/tool-response Select code samplecURL (shell:curl) ```js const url = 'https://agents.lumalabs.ai/v1/sessions/example/runs/example/tool-response'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"invocation_id":"example","result":"example"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```sh curl --request POST \ --url https://agents.lumalabs.ai/v1/sessions/example/runs/example/tool-response \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "invocation_id": "example", "result": "example" }' ``` - Productionagents.lumalabs.ai/v1/sessions/{session\_id}/runs/{run\_id}/tool-response Answer the pending interaction owned by one run in this session. ## Authorizations - **[BearerAuth](/api/agents/index.md#bearerauth)** ## Parameters ### Path Parameters **session\_id** required *Session Id* string **run\_id** required *Run Id* string ## Request Bodyrequired Media typeapplication/json *RunToolResponseRequest* Answer the gate or client tool a run is suspended on. object **invocation\_id** required *Invocation Id* Id from the run's `pending` payload. string <= 255 characters **result** required *Result* The answer. For a review gate, {"verdict": "proceed"}. ##### Examplegenerated ```json { "invocation_id": "example", "result": "example" } ``` ## Responses ### 200 Successful Response Media typeapplication/json *ToolResponseAck* object **status** required *Status* Tool result was routed to the waiting session worker. string Allowed value: delivered **warning** Any of: - [ToolResponseWarning](#tab-panel-0-0) - [null](#tab-panel-0-1) *ToolResponseWarning* The ack is not the whole truth. Nothing unresolved was waiting for the posted `invocation_id` — the session was reset, the turn already moved on, or this response was delivered before — so the result was accepted by the wire contract and consumed by nobody. On or after `sunset` the same condition answers `409`. object **code** required *Code* Why this ack carries a warning. string Allowed value: TOOL\_RESPONSE.UNKNOWN\_INVOCATION **message** required *Message* Human-readable explanation of what did not happen. string **sunset** required *Sunset* Date this condition starts answering 409 instead of 200. string format: date null ##### Example ```json { "status": "delivered", "warning": { "code": "TOOL_RESPONSE.UNKNOWN_INVOCATION" } } ``` ### 422 Validation Error Media typeapplication/json *HTTPValidationError* object **detail** *Detail* Array\ *ValidationError* object **ctx** *Context* object **input** *Input* **loc** required *Location* Array **msg** required *Message* string **type** required *Error Type* string ##### Examplegenerated ```json { "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ] } ```