POST /mail/consents
Record a recipient's marketing consent
Without active consent, any marketing email to this recipient is refused. Only an HMAC fingerprint of the address is stored.
Console session only (signed-in console).
Request body
application/json
| Field | Type | Description |
|---|---|---|
email | string · required | |
source | "web_form" | "double_opt_in" | "checkout" | "account_signup" | "in_person" | "paper_form" | "other" · required | |
consented_at | string · required | date of consent, with time zone, never in the future |
proof_reference | string · required | reference of the proof held by the client |
Responses
| Status | Description | Body |
|---|---|---|
201 | Consent recorded | |
422 | Invalid consent | |
503 | Register unavailable |
Examples
curl
curl -X POST "$GALON_API_BASE/mail/consents" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "ana@example.com", "source": "web_form", "consented_at": "2026-11-11T12:00:00Z", "proof_reference": "string"}'