API Reference

Support API Reference

Integrate support tickets into your application with our REST API.

Authentication

All API requests require a Bearer token. Generate your API key in Profile → API & Integrations.

curl -X GET "https://agentnodus.com/api/support/tickets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Keep your API key secret. Never expose it in client-side code.

Tickets

GET /api/support/tickets

Retrieve all support tickets for your account.

Show response example
{
  "data": [
    {
      "id": 1,
      "subject": "Help with order #123",
      "status": "open",
      "priority": "high",
      "from_email": "[email protected]",
      "created_at": "2026-01-15T10:00:00Z"
    }
  ],
  "meta": { "total": 1, "page": 1 }
}
POST /api/support/tickets

Create a new support ticket.

Parameter Type Required Description
subject string Ticket subject line
body string Ticket message content
from_email string Customer email address
from_name string - Customer name
priority string - low, normal, high, urgent
Show request example
curl -X POST "https://agentnodus.com/api/support/tickets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Help with my order",
    "body": "I need help tracking package #12345",
    "from_email": "[email protected]",
    "from_name": "John Doe",
    "priority": "high"
  }'
GET /api/support/tickets/{id}

Get details of a specific ticket including all messages and drafts.

AI Drafts

POST /api/support/tickets/{id}/draft

Generate an AI-powered draft response using your knowledge base.

Show example
curl -X POST "https://agentnodus.com/api/support/tickets/123/draft" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response
{
  "data": {
    "id": 456,
    "content": "Dear customer, thank you for reaching out...",
    "confidence": 0.92,
    "sources": ["FAQ: Shipping Policy", "KB: Returns"]
  }
}
POST /api/support/drafts/{id}/approve

Approve and send a draft response to the customer.

GET /api/support/knowledge/search?q={query}

Search your knowledge base for relevant articles.

GET /api/support/metrics

Get support analytics: ticket counts, resolution rates, SLA compliance.

Embeddable Widget

Add a chat widget to your website so customers can submit support tickets directly.

<script src="https://agentnodus.com/widget.js"
        data-agent-id="YOUR_AGENT_ID"
        data-api-key="YOUR_API_KEY">
</script>

Find your Agent ID in your Agent → Integration tab (login required).

Error Codes

Code Meaning
401 Unauthorized - Invalid or missing API key
403 Forbidden - You don't have access to this resource
404 Not Found - The requested resource doesn't exist
422 Validation Error - Check your request parameters
429 Rate Limited - Too many requests, slow down