Galon Cloud
Galon API v1

/mail/consents

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

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

FieldTypeDescription
emailstring · required
source"web_form" | "double_opt_in" | "checkout" | "account_signup" | "in_person" | "paper_form" | "other" · required
consented_atstring · requireddate of consent, with time zone, never in the future
proof_referencestring · requiredreference of the proof held by the client

Responses

StatusDescriptionBody
201Consent recorded
422Invalid consent
503Register 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"}'