Get a contact's details
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
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.
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
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
The API key should be passed in the request headers as api-key for authentication.
OAuth 2.0 client_credentials (machine-to-machine) grant. Exchange your app’s client_id/client_secret for a short-lived Bearer token.
Path parameters
Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded)
Query parameters
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
Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date.
Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date.
Response
Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)
Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)
Blacklist status for WhatsApp campaigns (true=blacklisted, false=not blacklisted)