API Reference

Complete API documentation for integrating with Support Intelligence.

Authentication

All API requests require authentication using your Clerk JWT token. Include the token in the Authorization header:

Authorization: Bearer YOUR_CLERK_TOKEN

Base URL

https://support-intelligence-backend.vercel.app

Endpoints

GET

/api/organizations/{orgId}/dashboard

Get dashboard statistics including ticket counts and risk summaries.

Response:

{
  "totalTickets": 1250,
  "analyzedTickets": 1180,
  "highRiskCount": 42,
  "averageRiskScore": 4.2
}
GET

/api/organizations/{orgId}/tickets

Get all tickets with optional pagination.

Query Parameters:

  • limit - Number of results (default: 20)
  • offset - Pagination offset
GET

/api/tickets/{ticketId}

Get detailed information about a specific ticket including AI analysis.

Response:

{
  "id": "ticket_123",
  "customerEmail": "customer@example.com",
  "subject": "Login issue",
  "message": "Full message text...",
  "sentiment": "negative",
  "frustrationLevel": 7,
  "churnRisk": 8,
  "keyIssues": ["repeated problem", "delayed response"],
  "recommendedAction": "Priority follow-up required",
  "createdAt": "2026-02-01T10:00:00Z"
}
GET

/api/organizations/{orgId}/reports

Get all weekly reports for the organization.

POST

/api/organizations/{orgId}/sync-zendesk

Trigger a manual sync of tickets from Zendesk.

POST

/api/organizations/{orgId}/settings

Update organization settings including Zendesk configuration.

Request Body:

{
  "zendeskSubdomain": "yourcompany",
  "zendeskEmail": "support@yourcompany.com",
  "zendeskApiToken": "your_api_token"
}
POST

/api/upload

Upload a CSV file of support tickets.

Request Body:

{
  "organizationName": "Your Organization",
  "csvData": "customer_id,subject,message\n..."
}

Rate Limits

API requests are limited to 100 requests per minute per organization. Exceeding this limit will return a 429 status code.

Support Intelligence - AI-Powered Churn Prevention