Can I use the HubSpot internal APIs?



We are building the integrating app with the exact same dashboard as HubSpot.

I saw the dashboard page fetch the number of contacts date by date from /contacts/search/v1/report/contacts.

I tried to call to that with access_token but failed in.

    const hs = new hubspot({
      clientId: config.clientId,
      clientSecret: config.clientSecret,
    if (hasExpiredToken() {
        .then(() => {
            method: 'POST',
            path: '/contacts/search/v1/report/contacts',
            qs: { portalId: portalId },
            body: {
              aggregations: [
                  includeEmpty: true,
                  intervalUnit: 'MONTH',
                  property: 'createdate',
                  size: 0,
                  type: 'DATE_HISTOGRAM'
              filterGroups: [
                  inclusive: true,
                  operator: 'TIME_UNIT_TO_DATE',
                  property: 'createdate',
                  rollForward: false,
                  timeUnit: 'YEAR',
                  timeUnitCount: 1,
                  _isDashOverride: true
          }, (ret) => {
          ... ... ...

So is there a way for us to use this API?

Best Ken


Hi @Ken_Kosaki,

That endpoint is for internal use only, and can’t be accessed using public authentication (API keys or OAuth access tokens). All publicly available endpoints are documented in out developer reference docs: