Integration Tools
Execute Tool
Changed onExecutes a tool against its configured third-party API using the supplied placeholder values. Auth credentials are resolved automatically; specify authId to select specific credentials when multiple exist. Optionally set saveAsMock to persist the live request/response as a named mock, or useMockToolDataId to return a stored mock without calling the third-party API. Returns the response body, status code, and optional mockToolDataId.
post/v1/integrations/{integrationId}/tools/{toolId}/execute
Request
- Base URLhttps://api.sigmamind.ai
- AuthAPI key in header X-API-Key
Path parameters
integrationIdstring required
Unique identifier of the integration to which the tool belongs.
toolIdstring required
Unique identifier of the tool to execute.
Request body
Example request
{
"placeholders": {
"customerId": "7654321"
},
"authId": "auth_P3kNz7Yv1Qm9",
"saveAsMock": {
"name": "Success - Order Confirmed",
"agentId": "agent_D5D0p7TUs66TTAEAx",
"toolAlias": "get_order"
}
}Response
OK
Example response
{
"toolId": "tool_X9pLm2Wq8Rt3",
"integrationId": "intg_AuUKK371Spr5",
"url": "https://my-store.myshopify.com/admin/api/2024-01/customers/7654321.json",
"method": "GET",
"statusCode": 200,
"success": true,
"responseBody": {
"customer_name": "Michael",
"account_id": "ACC-001"
},
"responseHeaders": {
"Content-Type": "application/json; charset=utf-8"
},
"errorMessage": "404 Not Found: {\"errors\": \"Customer not found\"}",
"durationMs": 342,
"executedAt": "2024-04-20T10:00:00Z",
"mockToolDataId": "mock_HaDxmGfwb8MZLlKM"
}Changes
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info