Get a Contact by ID
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.
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
Show _metadata properties
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const id = "id";56const request = {7url: `/v3/marketing/contacts/${id}`,8method: "GET",9};1011client12.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch((error) => {18console.error(error);19});