Skip to main content
GET
/
api
/
v2
/
accounts
/
{account_id}
/
reports
/
outgoing_messages_count
Get outgoing messages count grouped by entity
curl --request GET \
  --url https://app.chatwoot.com/api/v2/accounts/{account_id}/reports/outgoing_messages_count \
  --header 'api_access_token: <api-key>'
[
  {
    "id": 1,
    "name": "Agent One",
    "outgoing_messages_count": 42
  },
  {
    "id": 2,
    "name": "Agent Two",
    "outgoing_messages_count": 18
  }
]

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

Query Parameters

group_by
enum<string>
required

The entity to group outgoing message counts by.

Available options:
agent,
team,
inbox,
label
since
string

The timestamp from where report should start (Unix timestamp).

until
string

The timestamp from where report should stop (Unix timestamp).

Response

Success

id
number

The ID of the grouped entity (agent, team, inbox, or label).

name
string

The name of the grouped entity.

outgoing_messages_count
number

The total number of outgoing messages for this entity in the given time range.

Example:
[
{
"id": 1,
"name": "Agent One",
"outgoing_messages_count": 42
},
{
"id": 2,
"name": "Agent Two",
"outgoing_messages_count": 18
}
]