Skip to content

Support API

API for managing support tickets, SLA, and assignments

Overview

Support API is used for:

  • Create and manage support tickets
  • Track SLA
  • Assign tickets to support teams
  • Use AI Assistant for common questions

Endpoints

Tickets

Create Ticket

Create a new support ticket

http
POST /api/rpc/support/createTicket

Body

json
{
  "subject": "Cannot cancel booking",
  "description": "Clicked the cancel button but nothing happened",
  "priority": "high",
  "category": "booking"
}

List Tickets

Get a list of tickets

http
GET /api/rpc/support/listTickets

Parameters

NameTypeDescription
statusstringopen, pending, resolved, closed
prioritystringlow, medium, high, urgent
pagenumberPage (default: 1)

Get Ticket

Get ticket details

http
GET /api/rpc/support/getTicket

Parameters

NameTypeDescription
ticketIdUUIDTicket ID

Update Ticket

Update ticket status

http
PATCH /api/rpc/support/updateTicket

SLA

View and manage SLA

http
GET /api/rpc/support/sla
GET /api/rpc/support/sla/:ticketId

Ticket Assignment

Assign tickets to support teams

http
POST /api/rpc/support/ticketAssignment/assign
GET /api/rpc/support/ticketAssignment/list

AI Assistant

Use AI Assistant for common questions

http
POST /api/rpc/support/assistant/query

Body

json
{
  "query": "How to set up notifications?"
}

Example Code

typescript
// Create ticket
const ticket = await fetch('/api/rpc/support/createTicket', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    subject: 'Cannot cancel booking',
    description: 'Clicked the cancel button but nothing happened',
    priority: 'high',
  }),
});

// List tickets
const tickets = await fetch('/api/rpc/support/listTickets?status=open', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});

Released under the MIT License.