SkyLight Chat
API Reference

Support Tickets

Create and manage support tickets with your team.

Overview

The Tickets API lets you open support requests, add replies, and close tickets programmatically — the same tickets that appear in the SkyLight Chat support dashboard.


The Ticket object

{
  "id": 14,
  "ticket_id": "ABX9Y2KL",
  "subject": "Billing question about my subscription",
  "priority": "medium",
  "status": "open",
  "department": { "id": 1, "title": "Billing" },
  "last_reply_at": "2026-03-07T10:30:00.000000Z",
  "created_at": "2026-03-06T09:00:00.000000Z",
  "updated_at": "2026-03-07T10:30:00.000000Z"
}
FieldTypeDescription
idintegerUnique ticket ID
ticket_idstringHuman-readable reference code (e.g. ABX9Y2KL)
subjectstringTicket subject line
prioritystringlow, medium, high
statusstringopen, answered, closed
departmentobject|nullThe assigned support department
last_reply_atstring|nullISO 8601 timestamp of the latest reply

List tickets

GET /api/v1/tickets
ParameterTypeDescription
statusstringopen, answered, closed
prioritystringlow, medium, high
per_pageintegerMax 100 (default 25)
curl "https://dashboard.skylightchat.com/api/v1/tickets?status=open" \
  -H "X-Api-Key: ••••••••••••"

Create a ticket

POST /api/v1/tickets
FieldTypeRequiredNotes
subjectstring
bodystringInitial message
prioritystringNolow, medium, high (default: medium)
department_idintegerNoDefaults to the first available department
curl -X POST https://dashboard.skylightchat.com/api/v1/tickets \
  -H "X-Api-Key: ••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "WhatsApp channel not sending messages",
    "body": "Since this morning our WhatsApp channel stopped delivering messages. Account ID 9.",
    "priority": "high"
  }'

Returns 201 Created.


Get a ticket

GET /api/v1/tickets/{id}

Returns the ticket with its full reply history.

{
  "success": true,
  "data": {
    "id": 14,
    "ticket_id": "ABX9Y2KL",
    "subject": "WhatsApp channel not sending messages",
    "priority": "high",
    "status": "answered",
    "department": { "id": 2, "title": "Technical Support" },
    "replies": [
      {
        "id": 1,
        "reply": "Since this morning our WhatsApp channel stopped delivering messages.",
        "type": "client",
        "created_at": "2026-03-08T09:00:00.000000Z"
      },
      {
        "id": 2,
        "reply": "We have identified the issue and are rolling out a fix. Expected resolution in 30 minutes.",
        "type": "admin",
        "created_at": "2026-03-08T09:45:00.000000Z"
      }
    ]
  }
}

Reply to a ticket

POST /api/v1/tickets/{id}/reply
FieldTypeRequired
replystring✓ Max 10,000 characters
Replying to an answered ticket automatically re-opens it to open.
curl -X POST https://dashboard.skylightchat.com/api/v1/tickets/14/reply \
  -H "X-Api-Key: ••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{ "reply": "The issue is resolved now, thank you!" }'

Close a ticket

POST /api/v1/tickets/{id}/close

Marks the ticket as closed. Closed tickets cannot receive further replies.


List departments

GET /api/v1/tickets/departments

Returns available support departments. Use the id when creating a ticket to route it correctly.

{
  "success": true,
  "data": [
    { "id": 1, "title": "Billing" },
    { "id": 2, "title": "Technical Support" },
    { "id": 3, "title": "Sales" }
  ]
}