✉ MailCraft API Reference

Contacts

Create contact

Verified
POST/api/v1/contacts

Creates 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

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

StatusCaseBody
409error{"error": {"code": "Conflict", "message": "A contact with this email already exists."}}
400errorValidation{"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.