Sign In Get Early Access
Docs / API Reference

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 URLhttps://api.nexwatts.com/v1
FormatJSON request + response bodies
AuthenticationBearer token in Authorization header
Rate limit300 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.

StatusMeaning
400Bad request — invalid parameters
401Unauthorized — missing or invalid API key
404Not found — resource does not exist
429Rate limited — slow down requests
500Internal 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.

POST /v1/agents

Request body

ParameterTypeRequiredDescription
namestringYesIdentifier for the agent (kebab-case recommended)
descriptionstringYesPlain-language process description (max 2000 chars)
connectorsarrayNoList of connector IDs the agent may use
confidence_thresholdnumberNoSteps 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.

POST /v1/agents/:id/runs
{
  "mode": "live",
  "input": { "invoice_id": "INV-4419" }
}

agents.list

List all agents in your workspace. Supports pagination via cursor parameter.

GET /v1/agents
ParameterTypeDescription
statusstringFilter by status: draft, active, paused
limitintegerResults per page (default 20, max 100)
cursorstringPagination cursor from previous response

runs.list

List execution runs for a specific agent or across all agents.

GET /v1/runs
{
  "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.

GET /v1/escalations
FieldTypeDescription
escalation_idstringUnique ID
run_idstringID of the run that generated this escalation
stepintegerStep number that triggered escalation
reasonstringlow_confidence, api_error, timeout, rule_violation
statusstringopen, resolved, ignored

escalations.resolve

Mark an escalation as resolved. Include an optional resolution_note for the audit trail.

POST /v1/escalations/:id/resolve
{
  "action": "retry",
  "resolution_note": "API rate limit cleared — retrying step 3"
}