Create a new tool for an agent. Tools allow the agent to call external webhooks.
curl --request POST \
--url https://api.zavu.dev/v1/senders/{senderId}/agent/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "get_order_status",
"description": "Get the status of a customer order",
"webhookUrl": "https://api.example.com/webhooks/order-status",
"webhookSecret": "whsec_...",
"parameters": {
"type": "object",
"properties": {
"order_id": {
"type": "string",
"description": "The order ID to look up"
}
},
"required": [
"order_id"
]
}
}
'{
"tool": {
"id": "<string>",
"agentId": "<string>",
"name": "get_order_status",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
},
"webhookUrl": "<string>",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Tool created.
Show child attributes
curl --request POST \
--url https://api.zavu.dev/v1/senders/{senderId}/agent/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "get_order_status",
"description": "Get the status of a customer order",
"webhookUrl": "https://api.example.com/webhooks/order-status",
"webhookSecret": "whsec_...",
"parameters": {
"type": "object",
"properties": {
"order_id": {
"type": "string",
"description": "The order ID to look up"
}
},
"required": [
"order_id"
]
}
}
'{
"tool": {
"id": "<string>",
"agentId": "<string>",
"name": "get_order_status",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
},
"webhookUrl": "<string>",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}