Kerabie
API Reference

Tickets API

Overview numbers and CSV export for tickets.

Tickets are conversations created through a form, email or the API, so they share the conversation model. These endpoints use your API key.

import { KerAbieClient } from '@kerabie/sdk';

const kerabie = new KerAbieClient({ apiKey: process.env.KERABIE_API_KEY });

Overview numbers

GET /v1/tickets/stats
const stats = await kerabie.tickets.getStats();
{
  "open": 4,
  "unassigned": 2,
  "breachingSla": 1,
  "avgResolutionMinutes": 192,
  "resolutionDeltaPct": -18
}
FieldMeaning
openTickets that are new or active.
unassignedOpen tickets nobody owns.
breachingSlaOpen tickets past their SLA due time.
avgResolutionMinutesAverage time from creation to resolution for tickets resolved or closed in the last 7 days. null when none were.
resolutionDeltaPct% change versus the 7 days before. Negative is faster. null when there is nothing to compare against.

Results are cached for up to a minute and refresh immediately when a ticket's status, priority or assignee changes.


Export to CSV

GET /v1/tickets/export
const { filename, csv, count, truncated } = await kerabie.tickets.export({ status: 'ACTIVE' });
Query paramDescription
statusWAITING, ACTIVE, RESOLVED or CLOSED.
priorityLOW, NORMAL, HIGH or URGENT.
searchCase-insensitive match on requester name or email, or subject. A ticket reference such as KB-2041 (or just 2041) matches by id.
assignedToUser id of the assigned agent.
{
  "filename": "tickets-2026-10-05.csv",
  "csv": "Ticket,Subject,Status,Priority,Channel,Requester,Requester email,Assignee,Created,Last activity,SLA due,SLA breached
KB-2041,Refund not received,ACTIVE,URGENT,WHATSAPP,Chidi Okafor,chidi@palmex.com,Amara Osei,2026-10-05T09:10:00.000Z,2026-10-05T10:52:00.000Z,2026-10-05T11:00:00.000Z,yes
",
  "count": 1,
  "truncated": false
}
  • At most 5,000 tickets are returned. If more matched, truncated is true; narrow the filters and export again.
  • SLA breached is yes or no for open tickets with an SLA, and empty otherwise.
  • Plan requirement: exporting needs a plan with data exports (Pro and above). Other plans receive 403 Forbidden.
  • Cells beginning with =, +, - or @ are prefixed with a single quote so spreadsheet apps show them as text rather than evaluating them as formulas.