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

Get Sample Contacts



Operation overview

operation-overview page anchor

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
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
200400401403404500
Schema
Property nameTypeRequiredDescriptionChild properties
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: