Marketing
Add a newsletter subscriber from a public form, with double opt-in: the address stays pending and receives ONE confirmation email; nothing else is sent until the person confirms. Idempotent per address (201 created, 200 already known; a confirmed address is never re-mailed and a pending one at most every 10 minutes). Rate limit 600/h per organisation. Honours Idempotency-Key. (scope: marketing_subscribers:write)
POST
bearerAuthheader
AuthorizationBearer <token>API key as Bearer token
Idempotency-Key?stringOptional. A retry with the same key replays the first response (24 h).
Length
length <= 200application/json- body
email*stringFormat
emailLength
length <= 320name?stringLength
length <= 200locale?stringLanguage of the confirmation email and pages
Default
"ro"Value in
"ro""en"source?stringWhere the form lives, e.g. "example.ro/footer"
Length
length <= 120redirect_url?stringhttps only. After a successful confirm the person is sent here (303) with ?status=confirmed.
Format
uriLength
length <= 2048consent*GDPR art. 7(1) evidence. The text and the IP are stored only as hashes.
OK
application/json- response
data*error*nullcurl -X POST "https://example.com/marketing/subscribers" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "consent": { "text_version": "string" } }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "marketing_subscriber", "email": "user@example.com", "name": "string", "status": "pending", "locale": "ro", "source": "string", "consent_text_version": "string", "consent_at": "2019-08-24T14:15:22Z", "confirmation_sent": true, "confirmed_at": "2019-08-24T14:15:22Z", "unsubscribed_at": "2019-08-24T14:15:22Z", "unsubscribe_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "error": null}