Create a new contact
POST/api/partner-gateway/contacts
Creates a contact in your account and returns it with its generated ID.
- Minimum content: the body must set at least one field other than
gender. Give a phone number (E.164, such as+393331234567) or an email address if the contact must be reachable. - Accepted fields: those of the request schema, including
customField1,customField2,customField3,tagsandconsents. Any other property is ignored. - Invalid phone numbers and emails do not fail the call: the contact is created (
201), the invalid values stay inphoneNumbersandemailAddresses, anderrorslists each of them. - Main values:
mainEmailis the first valid address ofemailAddresses, or the first one if none is valid. An invalid number never becomesmobilePhoneNumber, soisValidMobilePhoneNumberis false when no valid mobile number is given. - Consents:
consentssets one status per channel. The format is on theconsentsfield. - Next steps: add the contact to contact lists with
POST /contacts/list/contactsto make it a campaign recipient. For bulk imports, usePOST /contacts/uploadorPOST /contacts/upload/vcard.
Consents are shared by the contacts with the same main email (or the same mobile number, for a contact without an email). If your account already has an older one, its consents prevail, even when it has none, and replace the ones sent here shortly after the
201. To change the consents of a person already in your account, update the existing contact withPUT /contacts/{id}.
Request
Responses
- 201
- 400
- 401
- 500
Contact created. errors lists its invalid phone numbers and email addresses, if any.
The body is missing, sets no field other than gender, cannot be read (for example a birthday in another format), or carries consents that cannot be stored: an unknown key, a status other than OPTIN or OPTOUT, a date in another format or without its status.
The API key is missing, invalid, or lacks the CONTACTS operation.
Unexpected server error.