Median

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

NameInTypeRequiredDescription
idpathstringYesA conversation id.

Request body

application/json, required.

FieldTypeRequiredDescription
toolstringYes
inputobjectNo

Responses

StatusDescription
200The run's approval row, to watch as it settles.
400The request is malformed, and the message names the field.
401The bearer token is missing, revoked, or expired.
404Not one of yours, or not there at all.
429Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits.

200 body

FieldTypeRequiredDescription
approvalIdstringNo

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"}}'

Still need help?

    Esc