History & Runs

Version history

GET/v2.0/tools/:toolId/history

Returns up to the last 10 versions, newest first. A snapshot is written on every create, config update, toggle and restore — whether made via this API or the dashboard.

cURL
curl https://api.sendiee.com/v2.0/tools/V1StGXR8Z5jdHi/history \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "versionNumber": 3,
      "changeType": "config_update",
      "changeDescription": "Updated description, parameters",
      "changedAt": "2026-05-30T12:00:00.000Z",
      "changedBy": {
        "source": "api"
      }
    },
    {
      "versionNumber": 2,
      "changeType": "toggle",
      "changeDescription": "Disabled tool",
      "changedAt": "2026-05-30T11:00:00.000Z",
      "changedBy": {
        "source": "dashboard",
        "email": "[email protected]"
      }
    },
    {
      "versionNumber": 1,
      "changeType": "create",
      "changeDescription": "Tool created",
      "changedAt": "2026-05-30T10:00:00.000Z",
      "changedBy": {
        "source": "api"
      }
    }
  ]
}

Restore a version

POST/v2.0/tools/:toolId/restore

Rolls the tool’s configuration back to a prior version and records the restore as a new version. The live isActive state is not changed by a restore.

Body

ParameterTypeDescription
versionNumbernumberThe version to restore (from the history list).
cURL
curl -X POST https://api.sendiee.com/v2.0/tools/V1StGXR8Z5jdHi/restore \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "versionNumber": 1 }'
{
  "error": true,
  "code": "VERSION_NOT_FOUND",
  "message": "Version 9 not found."
}

Execution logs (runs)

GET/v2.0/tools/:toolId/runs

Recent invocations of the tool by assistants — useful for debugging. Each run records status, duration, the HTTP detail (for function tools), and the captured arguments and result. Runs are retained for 15 days.

Query parameters

ParameterTypeDescription
pagenumber1-based page number.Default: 1
limitnumberPage size, 1–100.Default: 20
cURL
curl "https://api.sendiee.com/v2.0/tools/V1StGXR8Z5jdHi/runs?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "traceId": "tr_8f2a…",
      "toolName": "get_order_status",
      "toolType": "function",
      "status": "success",
      "errorMessage": null,
      "durationMs": 412,
      "httpStatus": 200,
      "requestUrl": "https://api.yourstore.com/orders/1001",
      "requestMethod": "GET",
      "args": {
        "order_id": "1001"
      },
      "result": {
        "status": "shipped",
        "carrier": "DHL"
      },
      "createdAt": "2026-05-30T12:30:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1,
    "hasMore": false
  }
}