Contacts
Create contact
Verified/api/v1/contactsCreates a contact. Needs email or phoneNumber. Returns 200 (not 201). Email format is not validated. Contact properties with a fallback value are copied into customFields.
Body Parameters
emailstringEmail (required if no phoneNumber).
phoneNumberstringPhone (required if no email).
firstNamestringlastNamestringcustomFieldsobject<string,string>Values must be strings; validated against Contact properties.
listIdsstring[]Lists to add the contact to.
tagIdsstring[]Not yet verified live.
topicSubscriptionsobjectNot yet verified live.
Notes
Returns 200 (not 201). Needs email or phoneNumber. Email format is NOT validated (an 'apitest' contact with email 'not-an-email' was accepted). Duplicate email = 409 Conflict. The org default custom field loyalty_tier=gold is injected when not supplied. emailOptIn/smsOptIn are false on create.
Errors
| Status | Case | Body |
|---|---|---|
| 409 | error | {"error": {"code": "Conflict", "message": "A contact with this email already exists."}} |
| 400 | errorValidation | {"error": {"code": "ValidationFailed", "message": "Either an email address or a phone number is required."}} |
Snippets use the MailCraftApi (C#) and MailCraft (Python) helpers from Introduction → Helpers.