Update a contact

There are 2 ways to update 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) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute

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 EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value

Query parameters

identifierTypeenumOptional

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

Request

Values to update a contact
attributesmap from strings to doubles or strings or booleans or lists of stringsOptional
Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}**
emailBlacklistedbooleanOptional

Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)

ext_idstringOptional

Pass your own Id to update ext_id of a contact.

listIdslist of longsOptional
Ids of the lists to add the contact to
smsBlacklistedbooleanOptional

Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)

smtpBlacklistSenderlist of stringsOptional
transactional email forbidden sender for contact. Use only for email Contact
unlinkListIdslist of longsOptional
Ids of the lists to remove the contact from

Response

Contact updated

Errors