Run an operation
POST /api/agents/:id/run
| Field | Type | Notes |
|---|---|---|
action |
string | optional — defaults to AGENT_RUN; uppercased |
detail |
string | optional — human-readable context, e.g. a document ID |
status |
string | optional — ok (default), warn, error, or info |
durationMs |
number | optional — processing time to record |
curl -X POST https://anysola.com/api/agents/AGENT_ID/run \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "INVOICE_MATCH", "detail": "INV-2041", "durationMs": 950}'
Returns 201 with the recorded operation:
{
"operation": {
"id": "665f1c...",
"createdAt": "2026-06-10T09:14:03.000Z",
"action": "INVOICE_MATCH",
"status": "ok"
}
}
Quota behavior
Billable operations count against your plan's monthly quota (calendar month, UTC). When the quota is exhausted the endpoint returns 402 with the current usage in the error message. The first successful operation also flips a deploying agent to active.