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
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
idstringrequired
200401403404500
Schema
Property nameTypeRequiredDescriptionChild properties
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 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 = "ZGkrHSypTsudrGkmdpJJ";
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
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.