Get Total Contact Count
GET/v3/marketing/contacts/count
Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)
This endpoint returns the total number of contacts you have stored.
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
Property nameTypeRequiredDescription
Authorizationstring
required
Default:
Bearer <<YOUR_API_KEY_HERE>>
200401403404500
Schema
Property nameTypeRequiredDescriptionChild properties
contact_countinteger
Optional
The total number of contacts.
billable_countinteger
Optional
The count of contacts this month for billing purposes.
Default:
0
Minimum: 0
billable_breakdownobject
Optional
billable_breakdown
will only appear to the parent user in an account with subusers.
Show billable_breakdown properties
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const request = {5url: `/v3/marketing/contacts/count`,6method: "GET",7};89client10.request(request)11.then(([response, body]) => {12console.log(response.statusCode);13console.log(response.body);14})15.catch((error) => {16console.error(error);17});