Skip to main content
POST
/
platform-api
/
v1
/
customers
/
tickets_stats
Get ticket stats
curl --request POST \
  --url https://app.sagepilot.ai/platform-api/v1/customers/tickets_stats \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "<string>"
}
'
{
  "closed": 92,
  "open": 23
}
{
  "closed": 92,
  "open": 23
}
Get ticket status counts for a customer in the authenticated workspace.

Required access

AuthenticationScopeDataset grant
API client v2customers:readcustomers

Body

customerId
string
required
Customer UUID to calculate ticket counts for. Open a customer in the Customer module and use the last UUID in the URL: /dashboard/[workspace_id]/customers/[customer_id]. See Resource IDs.
workspaceId
string
Optional workspace UUID. The authenticated workspace is used by default. Find the current workspace ID in Settings > API Details > Channels. See Resource IDs.
includeLinkedContacts
boolean
default:"false"
Include tickets from linked contacts.

Response

<status>
integer
Count of tickets for each returned status key.