API Reference
The Nexwatt REST API lets you create, deploy, and monitor workflow agents programmatically. Base URL: https://api.nexwatts.com/v1
Introduction
All requests must be made over HTTPS. The API uses standard HTTP response codes, accepts JSON request bodies, and returns JSON responses. Rate limits are enforced per workspace.
| Base URL | https://api.nexwatts.com/v1 |
| Format | JSON request + response bodies |
| Authentication | Bearer token in Authorization header |
| Rate limit | 300 requests / minute per workspace |
Authentication
Include your API key in every request. Get your key from Settings → API Keys in the Nexwatt dashboard.
Authorization: Bearer nxwt_live_xxxxxxxxxxxxxxxxxxxx
Errors
The API uses standard HTTP status codes. Error bodies always include error.code and error.message.
| Status | Meaning |
|---|---|
400 | Bad request — invalid parameters |
401 | Unauthorized — missing or invalid API key |
404 | Not found — resource does not exist |
429 | Rate limited — slow down requests |
500 | Internal server error |
agents.create
Create a new agent from a plain-language process description. The agent is created in draft status — call agents.run or deploy via the dashboard to activate.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Identifier for the agent (kebab-case recommended) |
description | string | Yes | Plain-language process description (max 2000 chars) |
connectors | array | No | List of connector IDs the agent may use |
confidence_threshold | number | No | Steps below this confidence are flagged (default 0.65) |
POST /v1/agents
{
"name": "invoice-sync-v1",
"description": "When a new invoice is marked paid in QuickBooks, update the matching deal in HubSpot to Closed Won and notify the account owner in Slack.",
"connectors": ["quickbooks", "hubspot", "slack"],
"confidence_threshold": 0.70
}
Response
{
"agent_id": "agt_01J8K2M9P3Q4R5S6T7U8V9W0",
"name": "invoice-sync-v1",
"status": "draft",
"steps_extracted": 5,
"steps_flagged": 1,
"created_at": "2026-06-27T14:31:00Z"
}
agents.run
Trigger an immediate run of a deployed agent. Use mode: "test" to execute with simulated inputs and no live system writes.
{
"mode": "live",
"input": { "invoice_id": "INV-4419" }
}
agents.list
List all agents in your workspace. Supports pagination via cursor parameter.
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: draft, active, paused |
limit | integer | Results per page (default 20, max 100) |
cursor | string | Pagination cursor from previous response |
runs.list
List execution runs for a specific agent or across all agents.
{
"runs": [
{
"run_id": "run_01J8K3N0P1Q2R3S4T5U6V7W8",
"agent_id": "agt_01J8K2M9P3Q4R5S6T7U8V9W0",
"status": "completed",
"steps_completed": 5,
"started_at": "2026-06-27T09:14:22Z",
"completed_at": "2026-06-27T09:14:31Z"
}
],
"next_cursor": "cur_01J8K4P0Q1R2S3T4U5V6W7X8"
}
escalations.list
List open escalations requiring human review. Escalations are created when a step fails, times out, or falls below the confidence threshold.
| Field | Type | Description |
|---|---|---|
escalation_id | string | Unique ID |
run_id | string | ID of the run that generated this escalation |
step | integer | Step number that triggered escalation |
reason | string | low_confidence, api_error, timeout, rule_violation |
status | string | open, resolved, ignored |
escalations.resolve
Mark an escalation as resolved. Include an optional resolution_note for the audit trail.
{
"action": "retry",
"resolution_note": "API rate limit cleared — retrying step 3"
}