GET
/
api
/
users
/
count
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.users.count({
    organizationId: '123e4567-e89b-12d3-a456-426614174001',
    websiteId: '123e4567-e89b-12d3-a456-426614174000',
  });

  console.log(response.totalCount);
}

main();
{
  "totalCount": 123
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

websiteId
string
required

The ID of the website

Example:

"123e4567-e89b-12d3-a456-426614174000"

organizationId
string
required

The ID of the organization

Example:

"123e4567-e89b-12d3-a456-426614174001"

Response

200
application/json
200

Schema for counting users response

totalCount
number
required

Total count of users