POST /conversations/{id}/tools/run
Updated Oct 1, 20261 minute read
Run a tool
Runs a tool now, as the team. No sign-off wait, whatever the risk: calling this is the decision. The call lands as an approval row at executing; poll GET /tool-approvals/{id} for the result. Input values are the flat scalars manifest schemas declare.
Part of Tool approvals.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | A conversation id. |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
tool | string | Yes | |
input | object | No |
Responses
| Status | Description |
|---|---|
200 | The run's approval row, to watch as it settles. |
400 | The request is malformed, and the message names the field. |
401 | The bearer token is missing, revoked, or expired. |
404 | Not one of yours, or not there at all. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
approvalId | string | No |
Example request
curl -X POST https://api.median.sh/v1/conversations/id/tools/run \
-H "Authorization: Bearer $BEARER_AUTH" \
-H "content-type: application/json" \
-d '{"tool":"refundOrder","input":{"orderId":"ord_42"}}'