API Reference
The eClips Workforce API is JSON over HTTPS. Every request carries a bearer API key, and the key decides which organization and scopes apply. The base URL is https://api.eclips.tech. The API is included on the Growth and Enterprise plans.
Authentication
Pass your API key as a bearer token: Authorization: Bearer eck_live_…. Keys are generated from your dashboard and carry their own organization and scopes, so there is no separate org header. Keep keys on the server and out of client-side code.
curl https://api.eclips.tech/v1/run \
-H "Authorization: Bearer $ECLIPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_type": "rfq_generator",
"task": "Draft an RFQ for 500 laptops, delivery to Amman within 30 days"
}'Endpoints
Runs
/v1/runStart an agent run. Returns a run_id straight away; the run itself happens in the background.
/v1/runsList runs for your organization (query: status, limit, offset).
/v1/runs/:idFetch a run plus any linked triage item: { run, triage_item }.
/v1/runs/:id/streamServer-Sent Events with live status updates until the run finishes.
Triage
/v1/triageList items waiting for a person (query: limit, offset).
/v1/triage/:id/approveApprove an item and continue the blocked run (body: resolution_note?).
/v1/triage/:id/rejectReject an item and stop the blocked run (body: reason?).
Webhooks
/v1/webhooksRegister a webhook (body: url, events[]). Returns the signing secret once.
/v1/webhooksList registered webhook endpoints.
/v1/webhooks/:idDelete a webhook endpoint.
/v1/webhooks/:id/deliveriesList recent delivery attempts for a webhook.
/v1/webhooks/test/:orgIdSend a test payload to your organization's configured webhook URL.
Batches
/v1/batchesCreate a batch: one agent over up to 500 rows (body: agent_type, rows[]).
/v1/batchesList batches for your organization (query: limit, offset).
/v1/batches/:idFetch a batch with completed, failed and total row counts.
/v1/batches/:id/cancelCancel an in-flight batch.
Health
/v1/healthService health check. No authentication required.
Example response
A POST /v1/run returns the queued run:
{
"run_id": "a1b2c3d4-0000-4000-8000-000000000000",
"status": "queued",
"agent_type": "rfq_generator",
"estimated_completion": "async"
}Webhooks
Register a webhook with POST /v1/webhooks (body: url, events[]). The response includes the signing secret once. eClips POSTs a signed payload on each of these events: run.completed, run.failed, and run.triage_required. Each request carries an X-eClips-Signature: sha256=… header. Verify the HMAC-SHA256 digest with your signing secret before you trust the body.
Errors
Errors use standard HTTP status codes and a typed error field. The SDK maps each one to its own error class.
| Status | Error | Meaning |
|---|---|---|
| 400 / 422 | validation_error | The request body failed validation, for example a missing task or an unknown agent_type. |
| 401 | authentication_error | Missing or invalid API key. |
| 403 | insufficient_scope | The key lacks the required scope (for example agents:run), or the plan does not include the API. |
| 404 | not_found | Run or triage item does not exist for your org. |
| 429 | rate_limited | Too many requests. Respect the Retry-After header. |