Skip to contentSkip to navigationSkip to topbar
On this page

Get a Contact by ID



Operation overview

operation-overview page anchor

GET/v3/marketing/contacts/{id}

Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)

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
Property nameTypeRequiredDescription
Authorizationstring
required
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
idstring
required
200401403404500
Schema
Property nameTypeRequiredDescriptionChild properties
idstring

Optional


first_namestring

Optional


last_namestring

Optional


unique_namestring

Optional


emailstring

Optional


phone_number_idstring

Optional


external_idstring

Optional


anonymous_idstring

Optional


alternate_emailsarray[string]

Optional


address_line_1string

Optional


address_line_2string

Optional


citystring

Optional


state_province_regionstring

Optional


countrystring

Optional


postal_codestring

Optional


phone_numberstring

Optional


whatsappstring

Optional


linestring

Optional


facebookstring

Optional


list_idsarray[string]

Optional


segment_idsarray[string]

Optional


custom_fieldsobject

Optional


created_atstring

Optional


updated_atstring

Optional


_metadataselfMetadata

Optional

Get a Contact by IDLink to code sample: Get a Contact by ID
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const id = "id";
5
6
const request = {
7
url: `/v3/marketing/contacts/${id}`,
8
method: "GET",
9
};
10
11
client
12
.request(request)
13
.then(([response, body]) => {
14
console.log(response.statusCode);
15
console.log(response.body);
16
})
17
.catch((error) => {
18
console.error(error);
19
});