Get a contact's details

<Note title="Follow this format when passing a SMS phone number as an attribute"> Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx </Note> There are 2 ways to get a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute <br><br>Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

identifierstring or integerRequired

Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded)

Query parameters

identifierTypeenumOptional

email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute

startDatestringOptional

Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate

endDatestringOptional

Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.

Response

Contact informations
attributesobject
Set of attributes of the contact
createdAtstring

Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)

emailBlacklistedboolean

Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)

idlong
ID of the contact for which you requested the details
listIdslist of longs
modifiedAtstring

Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)

smsBlacklistedboolean

Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)

statisticsobject
Campaign statistics of the contact
emailstring or nullformat: "email"
Email address of the contact for which you requested the details
listUnsubscribedlist of longs or null

Errors