✉ MailCraft API Reference

Contacts

Replace contact

Verified
PUT/api/v1/contacts/{id}

Full replace — omitted fields are cleared. Accepts the id only (an email gives an empty 404).

Path Parameters

Body Parameters

Notes

Full replace (Q1 confirmed): omitted fields are cleared (phoneNumber and lastName went to null, customFields was replaced, then the org default loyalty_tier=gold reappeared). Requires email or phoneNumber, otherwise 400. Id only: PUT by email returns 404 with an EMPTY body. Unknown id = 404 NotFound envelope. 'unsubscribed' was accepted but did not change emailOptIn/smsOptIn in the one observed case (verify live).

Errors

StatusCaseBody
400error{"error": {"code": "ValidationFailed", "message": "Either an email address or a phone number is required."}}
404errorNotFound{"error": {"code": "NotFound", "message": "Contact not found."}}
404errorByEmail(empty)

Snippets use the MailCraftApi (C#) and MailCraft (Python) helpers from Introduction → Helpers.