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

Get a Contact by ID



API Overview

api-overview page anchor

GET/v3/marketing/contacts/{id}

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

This endpoint returns the full details and all fields for the specified contact. The "Get Contacts by Identifier" endpoint can be used to get the ID of a contact.


Authentication

authentication page anchor
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
idstringrequired
200401403404500
Schema
idstring

first_namestring

last_namestring

unique_namestring

emailstring

phone_number_idstring

external_idstring

anonymous_idstring

alternate_emailsarray[string]

address_line_1string

address_line_2string

citystring

state_province_regionstring

countrystring

postal_codestring

phone_numberstring

whatsappstring

linestring

facebookstring

list_idsarray[string]

segment_idsarray[string]

custom_fieldsobject

created_atstring

updated_atstring

_metadataobject

Get a Contact by ID

get-a-contact-by-id page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

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


Rate this page: