✉ MailCraft API Reference

Contacts

Update topic subscriptions

Verified
PATCH/api/v1/contacts/{id|email}/topics

Body is a map of topic id → boolean. Returns the updated array.

Path Parameters

Body Parameters

Notes

Body is { "<topicGuid>": true|false }. Returns the full updated topics array (same shape as GET). Unknown topic GUID = 400 ValidationFailed; a non-GUID key or non-boolean value = 400 ProblemDetails (errors under '$.<key>').

Errors

StatusCaseBody
400error{"error": {"code": "ValidationFailed", "message": "Preference topic \"00000000-0000-0000-0000-000000000000\" was not found."}}
400errorProblemDetails{"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1", "title": "One or more validation errors occurred.", "status": 400, "errors": {"$.x": ["The JSON value could not be converted to System.Guid. Path: $.x | LineNumber: 0 | BytePositionInLine: 5."]}, "

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