NEXUS / API Documentation

Developer API Documentation

Integrate purpose-built autonomous agents via REST API, Webhooks, or Node.js SDK.

1. Authentication

Authenticate your HTTP API requests by providing your secret API key in the request `Authorization` header.

# Include Bearer token in all HTTP headers
Authorization: Bearer nxs_live_9812401928401924

2. Support Router Endpoint (`POST /v1/agents/support-router/run`)

Triggers intent classification, urgency scoring, and target queue determination.

cURL Example

curl -X POST https://api.nexusagents.com/v1/agents/support-router/run \
  -H "Authorization: Bearer nxs_live_9812401928401924" \
  -H "Content-Type: application/json" \
  -d '{
    "ticket_id": "TICK-9042",
    "customer_id": "cust_44102",
    "raw_text": "I was billed twice for my Growth Tier subscription renewal."
  }'

200 OK Response Payload

{
  "execution_id": "exec_8819024",
  "agent": "support-router",
  "status": "success",
  "latency_ms": 184,
  "data": {
    "intent": "Billing Duplicate Charge",
    "priority": "HIGH",
    "target_department": "Finance Tier 2",
    "confidence": 0.994
  }
}

3. JavaScript SDK Integration

// Node.js / TypeScript Example
import { NexusClient } from '@nexus-agents/sdk';

const nexus = new NexusClient({ apiKey: process.env.NEXUS_API_KEY });

const result = await nexus.agents.dataExtractor.extract({
  documentUrl: 'https://storage.acme.com/invoices/inv_2026.pdf'
});