contacts

Create a contact

<Note>Follow this format when passing a "SMS" phone number as an attribute. Accepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx</Note> Creates new contacts on Brevo. Contacts can be created by passing either - <br><br> 1. email address of the contact (email_id), <br> 2. phone number of the contact (to be passed as "SMS" field in "attributes" along with proper country code), For example- {"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"} <br> 3. ext_id <br>

post/contacts

Request

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

Request body

attributesobject

Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. These attributes must be present in your Brevo account. For eg: {"FNAME":"Elly", "LNAME":"Roger", "COUNTRIES": ["India","China"]}

emailstring email

Email address of the user. Mandatory if "ext_id" & "SMS" field is not passed.

emailBlacklistedboolean

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

ext_idstring

Pass your own Id to create a contact.

listIdsinteger[]

Ids of the lists to add the contact to

smsBlacklistedboolean

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

smtpBlacklistSenderstring[]

transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )

updateEnabledboolean

Facilitate to update the existing contact in the same request (updateEnabled = true)

forceMergeboolean

When true, if the contact being created 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.

getIdboolean

When true, the response returns the id of the surviving contact after merge.

Response

Contact created

idinteger

ID of the contact when a new contact is created

Changes

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