Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Conversations Stats Resource

Aggregated conversation statistics

get

Returns aggregated counts for the conversations summary box: totals by lifecycle state (open/closed), by last-message author (pendingReply/replied), by read state (unread/read), a breakdown of the closed conversations by close reason, plus average first-response and resolution times and the number assigned to the caller. The filters accepted here mirror the conversation list endpoint (minus pagination), so the summary stays coherent with the visible list. All counts are computed over the FULL filtered set — each axis does not ignore its own filter — so open + closed == total and the sum of byCloseReason == closed.

Authorizations
SessionIdstringRequired

SessionId

Query parameters
lastMessageFromstring · enumOptional

Type of user in the system, either an employee or a company user (admin, manager, etc).

Possible values:
fromstring · date-timeOptional

Inclusive lower bound for the conversation's last activity, format ddMMyyyy.

tostring · date-timeOptional

Inclusive upper bound for the conversation's last activity, format ddMMyyyy.

ownerIdstringOptional

Restrict to conversations owned by these assignees (admins only; ignored for managers).

personEncryptedIdstringOptional

Restrict to conversations of a single participant, given as the person's encrypted id.

statestring · enumOptional

Filter by lifecycle state: OPEN, CLOSED, or omitted for both.

Possible values:
readStatestring · enumOptional

Filter by read state from the requesting dashboard user's point of view: READ, UNREAD, or omitted for both.

Possible values:
Responses
200

The aggregated statistics for the filtered scope

*/*

Aggregated conversation counts for the dashboard summary box.

totalinteger · int64Optional

Total conversations in the filtered scope.

openinteger · int64Optional

Conversations in the OPEN lifecycle state (not closed).

closedinteger · int64Optional

Conversations in the CLOSED lifecycle state.

pendingReplyinteger · int64Optional

Conversations whose last message is from the employee, i.e. awaiting a company reply.

repliedinteger · int64Optional

Conversations whose last message is from the company, i.e. already replied.

unreadinteger · int64Optional

Conversations unread from the dashboard user's point of view.

readinteger · int64Optional

Conversations read from the dashboard user's point of view.

avgFirstResponseHoursnumber · doubleOptional

Average hours from creation to the first company reply. Null when no conversation has been replied to in scope.

avgResolutionHoursnumber · doubleOptional

Average hours from creation to close. Null when no conversation is closed in scope.

ownedByMeinteger · int64Optional

Conversations assigned to the requesting user.

get/api/v1/company/stats/conversations
GET /api/v1/company/stats/conversations HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
{
  "total": 1,
  "open": 1,
  "closed": 1,
  "pendingReply": 1,
  "replied": 1,
  "unread": 1,
  "read": 1,
  "byCloseReason": {
    "ANY_ADDITIONAL_PROPERTY": 1
  },
  "avgFirstResponseHours": 1,
  "avgResolutionHours": 1,
  "ownedByMe": 1
}

Last updated