API Reference

Outpost exposes REST endpoints through the Next.js API routes for programmatic access to tickets, accounts, and configuration. All endpoints require authentication.

Authentication

API requests are authenticated via session cookies (for dashboard users) or API keys for external integrations.

example request bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://your-outpost.com/api/tickets

Tickets

List Tickets

MethodPathDescription
GET/api/ticketsList tickets with pagination and filters

Query parameters:

Get Ticket

MethodPathDescription
GET/api/tickets/:idGet a single ticket with full details

Create Ticket

MethodPathDescription
POST/api/ticketsCreate a new ticket
request body json
{
  "title": "Unable to connect to API",
  "description": "Getting 502 errors when calling /api/chat",
  "source": "web",
  "priority": "high",
  "accountId": "acc_123"
}

Update Ticket

MethodPathDescription
PATCH/api/tickets/:idUpdate ticket fields

Accounts

MethodPathDescription
GET/api/accountsList all customer accounts
GET/api/accounts/:idGet account details with support history
POST/api/accountsCreate a new account
PATCH/api/accounts/:idUpdate account details

Analytics

MethodPathDescription
GET/api/analytics/overviewDashboard overview metrics
GET/api/analytics/slaSLA compliance report
GET/api/analytics/volumeTicket volume over time
GET/api/analytics/agentsPer-agent performance metrics

Webhooks

Outpost can send webhooks to external systems when events occur. Configure webhook endpoints in the dashboard under Settings → Webhooks.

Events

EventDescription
ticket.createdNew ticket created from any source
ticket.updatedTicket fields changed (status, priority, assignee)
ticket.resolvedTicket marked as resolved
ticket.sla_breachSLA response or resolution target missed
message.createdNew message on a ticket
account.createdNew customer account added

Webhook Payload

webhook payload json
{
  "event": "ticket.created",
  "timestamp": "2025-01-15T10:30:00Z",
  "data": {
    "id": "tkt_abc123",
    "title": "Unable to connect to API",
    "status": "open",
    "priority": "high",
    "source": "discord"
  }
}

Signature verification: All webhook payloads include an X-Outpost-Signature header containing an HMAC-SHA256 signature. Verify this against your webhook secret to ensure the payload is authentic.