App Total Count Model

You can use the API to get counts of users and companies filtered by certain criteria.

Counts are a legacy way to periodically obtain data for the purposes of tracking rates of change in contact and company data.

Workspace Total Count Object

The total count object contains the summary of the following fields in a workspace, -

AttributeTypeDescription
typestringvalue is 'count.hash'
companyobjectContains the number of companies in your App
segmentobjectContains the number of segments in your App
tagobjectContains the number of tags in your App
userobjectContains the number of users in your App
leadobjectContains the number of leads in your App

The count of tags and segments includes archived tags and segments.

{
    "type": "count.hash",
    "company": {
        "count": 55
    },
    "user": {
        "count": 54944
    },
    "lead": {
        "count": 17
    },
    "tag": {
        "count": 1012
    },
    "segment": {
        "count": 7
    }
}
# App Counts
$ curl 'https://api.intercom.io/counts' \
-H 'Authorization:Bearer <Your access token>' \
-H 'Accept:application/json'
# App Total Counts
HTTP/1.1 200 OK

{
    "type": "count.hash",
    "company": {
        "count": 55
    },
    "user": {
        "count": 54944
    },
    "lead": {
        "count": 17
    },
    "tag": {
        "count": 1012
    },
    "segment": {
        "count": 7
    }
}
intercom.counts.for_app
<?php
// Global App Counts
$intercom->counts->getCounts([]);
?>
// Global App Counts
final Counts.Totals appTotals = Counts.appTotals();
appTotals.getCompany().getValue();
appTotals.getSegment().getValue();
appTotals.getTag().getValue();
appTotals.getUser().getValue();

The counts for your App can be obtained using GET against the https://api.intercom.io/counts URL with the type and count parameters as follows

CountType ValueCount Value
Global App CountsNoneNone