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"
}
| Field | Type | Description |
|---|---|---|
id | integer | Unique ticket ID |
ticket_id | string | Human-readable reference code (e.g. ABX9Y2KL) |
subject | string | Ticket subject line |
priority | string | low, medium, high |
status | string | open, answered, closed |
department | object|null | The assigned support department |
last_reply_at | string|null | ISO 8601 timestamp of the latest reply |
List tickets
GET /api/v1/tickets
| Parameter | Type | Description |
|---|---|---|
status | string | open, answered, closed |
priority | string | low, medium, high |
per_page | integer | Max 100 (default 25) |
curl "https://dashboard.skylightchat.com/api/v1/tickets?status=open" \
-H "X-Api-Key: ••••••••••••"
Create a ticket
POST /api/v1/tickets
| Field | Type | Required | Notes |
|---|---|---|---|
subject | string | ✓ | |
body | string | ✓ | Initial message |
priority | string | No | low, medium, high (default: medium) |
department_id | integer | No | Defaults 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
| Field | Type | Required |
|---|---|---|
reply | string | ✓ 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" }
]
}
