Record tracking consent or its withdrawal
curl --request PUT \ --url https://rocketem.fotone.io/api/v2/recipients/tracking-consent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "customer@example.com", "status": "granted", "occurred_at": "2026-10-12T14:03:00+02:00", "text_version": "shop-2026-10" }'Required scope: tracking_consent:write
granted records consent, revoked withdraws it (open/click events of the
address are anonymised). A consent only replaces an existing withdrawal when
occurred_at is later than that withdrawal (otherwise 409 revoked_later);
a withdrawal dated before an existing consent changes nothing (409
granted_later). An existing consent keeps its original date and proof.
Send occurred_at with the time the person decided in your system; consent
without it is stored as undated. No IP address is stored for API calls.
A withdrawal the person made themselves in rocketEM (consent page, preference
center, unsubscribe) can only be lifted by the person: the answer is 409
revoked_by_recipient. Recorded with source api.
Requires tracking_consent:write scope.
Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Header Parameters
Abschnitt betitelt „Header Parameters“Unique key for idempotent requests. Responses cached 24h.
Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“object
When it happened (not in the future). Without it a consent never replaces a withdrawal.
Identifier of the consent wording shown (stored as api:<value>); for status granted it requires occurred_at; ignored for revoked
Example
{ "email": "customer@example.com", "status": "granted", "occurred_at": "2026-10-12T14:03:00+02:00", "text_version": "shop-2026-10"}Responses
Abschnitt betitelt „Responses“Consent state after the update
object
object
Signup, consent_page, preference_center, import, api, unsubscribe, shop_unsubscribe, blocked
Whether opens and clicks of this address are recorded right now
Example
{ "data": { "status": "granted" }}Invalid or missing API token
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}Token lacks required scope
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}A newer or equally dated withdrawal (revoked_later), a withdrawal by the person (revoked_by_recipient), a newer or equally dated consent (granted_later), or the address was deleted per GDPR request (conflict); nothing changed
Validation failed
object
object
object
Example
{ "error": { "code": "validation_error", "message": "The given data was invalid.", "status": 422 }}Organisation not configured for API access
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}