For Developers
Ticket history
All tickets of one contact, for example to show customers their requests in your account area or to show an operator earlier requests. Every ticket always comes with last_message_preview and message_count, so you can build an inbox-style list without a request per ticket.
GET
/api/v1/contacts/{contact_id}/ticketsA contact’s tickets
Newest first. last_message_preview is the first 100 characters of the latest message, message_count is the number of messages; internal notes count in neither. A contact that doesn’t exist gives an empty list, not a 404.
Query parameters:
status:new,open,in_progress,pending,resolved,closed; anything else gives 422page(default 1),page_size(default 20, max 100)
curl
curl "https://api.support.forestsnet.com/api/v1/contacts/44e1.../tickets?status=closed&page=1" \
-H "Authorization: Bearer sk_xxx"200 OK (some ticket fields omitted)
{
"items": [
{
"id": "8a3f...",
"contact_id": "44e1...",
"subject": "Payment doesn't go through",
"status": "closed",
"priority": "high",
"rating": 5,
"created_at": "2026-03-20T10:00:00",
"closed_at": "2026-03-20T12:30:00",
...,
"last_message_preview": "Thanks, it works now!",
"message_count": 7
}
],
"total": 12,
"page": 1,
"page_size": 20
}Python SDK
# A contact's closed tickets
tickets = client.tickets.history("CONTACT_ID", status="closed")
for t in tickets.items:
print(t.subject, t.last_message_preview, t.message_count, t.rating)In the SDK,
tickets.history() defaults to status="closed". To get tickets in every status, pass status=None.Was this page helpful?

