Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Get Sample Contacts



API Overview

api-overview page anchor

The Twilio SendGrid Marketing Campaigns Contacts API allows you to add, update, and delete contacts in your SendGrid account. You can also import and export contacts in bulk via CSV.

For more guidance on working with contacts, see Create and Manage Contacts.

Building and maintaining a healthy contact list is an essential first step in building trust as an email sender. A healthy contact list also enables you to build intelligent segments and Automations to reach your customers with the right message at the right time.


GET/v3/marketing/contacts

Base url: https://api.sendgrid.com

This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list.

This list will then be sorted by email address.

The full contact count is also returned.

Please note that pagination of the contacts has been deprecated.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.


Authentication

authentication page anchor
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
200400401403404500
Schema
resultarray[object]

_metadataobject

contact_countinteger

Get Sample Contacts

get-sample-contacts page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_18
const client = require('@sendgrid/client');
_18
client.setApiKey(process.env.SENDGRID_API_KEY);
_18
_18
_18
const request = {
_18
url: `/v3/marketing/contacts`,
_18
method: 'GET',
_18
_18
}
_18
_18
client.request(request)
_18
.then(([response, body]) => {
_18
console.log(response.statusCode);
_18
console.log(response.body);
_18
})
_18
.catch(error => {
_18
console.error(error);
_18
});


Rate this page: