contacts

Update a contact

<Note>Follow this format when passing a "SMS" phone number as an attribute. Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx <br><br> If a blocklisted contact's email address is updated, it is going to remove that blocklisting from the contact and they will be resubscribed.</Note> 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

put/contacts/{identifier}

Request

  • Base URL: https://api.brevo.com/v3
  • URL: https://api.brevo.com/v3/contacts/{identifier}
  • Auth: API key in header api-key

Path parameters

string required
OR
integer required

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_NUMBER attribute value

Query parameters

identifierType'email_id' | 'contact_id' | 'ext_id' | 'phone_id' | 'whatsapp_id' | 'landline_number_id'

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_NUMBER attribute

Request body

attributesobject

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"}

emailBlacklistedboolean

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

ext_idstring

Pass your own Id to update ext_id of a contact.

listIdsinteger[]

Ids of the lists to add the contact to

smsBlacklistedboolean

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

smtpBlacklistSenderstring[]

transactional email forbidden sender for contact. Use only for email Contact

unlinkListIdsinteger[]

Ids of the lists to remove the contact from

forceMergeboolean

When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent last_modified timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict.

Response

Contact updated

object required

Changes

No recorded changes to this operation across all 1 revision of this API.