Complaints
Get complaint stat-card counts
Returns per-status complaint counts for the authenticated
organization, sized for the dashboard stat-card view. The
resolved_recent tally is bounded by resolved_window_days
(currently 30) so the card stays consistent across page renders.
Requires the complaints:read scope.
AuthorizationBearer <token>
Authenticate by sending your API key as a bearer token:
Authorization: Bearer am_live_.... Every request is automatically
scoped to the organization that owns the key and to the scopes granted
to that key.
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/complaints/counts"{
"success": true,
"error": {
"code": "string",
"message": "string",
"request_id": "string",
"details": {
"property1": "string",
"property2": "string"
}
},
"meta": {
"total": 0,
"limit": 0,
"offset": 0,
"next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNC0yNlQxMjowMDowMFoiLCJpZCI6IjAxOTAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMSJ9",
"last_event_at": "2019-08-24T14:15:22Z"
},
"data": {
"new": 0,
"in_triage": 0,
"resolved_recent": 0,
"resolved_window_days": 1
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "authentication failed",
"request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "missing required scope",
"request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
}
}