cURL
curl -X POST https://reygrid.com/api/v1/agents/{AgentId}/conversations/user_42/tool/cancel/call_7c57b59c \
-H "Authorization: Bearer $REYGRID_API_KEY"from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
client.cancel_tool_call("{AgentId}", "user_42", "call_7c57b59c")import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
await client.cancelToolCall("{AgentId}", "user_42", "call_7c57b59c");{
"success": true,
"canceled": true
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": false,
"error": {
"code": "TOOL_CALL_NOT_FOUND",
"message": "This tool call does not exist"
}
}{
"success": false,
"error": {
"code": "TOOL_CALL_ALREADY_CANCELED",
"message": "This tool call is already canceled"
}
}Tool calls
Cancel a tool call
Cancels a tool call belonging to a conversation.
conversationRef can be either a conversationId or a persistent userId.
POST
/
agents
/
{agentId}
/
conversations
/
{conversationRef}
/
tool
/
cancel
/
{toolCallId}
cURL
curl -X POST https://reygrid.com/api/v1/agents/{AgentId}/conversations/user_42/tool/cancel/call_7c57b59c \
-H "Authorization: Bearer $REYGRID_API_KEY"from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
client.cancel_tool_call("{AgentId}", "user_42", "call_7c57b59c")import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
await client.cancelToolCall("{AgentId}", "user_42", "call_7c57b59c");{
"success": true,
"canceled": true
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": false,
"error": {
"code": "TOOL_CALL_NOT_FOUND",
"message": "This tool call does not exist"
}
}{
"success": false,
"error": {
"code": "TOOL_CALL_ALREADY_CANCELED",
"message": "This tool call is already canceled"
}
}Authorizations
ReyGrid API key sent as a Bearer token.
Path Parameters
The ID of the agent.
A conversation ID or persistent user ID.
The ID of the tool call to cancel.