Subscribe a recipient
curl --request POST \ --url https://rocketem.fotone.io/api/v2/recipients/subscribe \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "audience": "aud_xxxxxxxxxxxx", "email": "hello@example.com", "consent_at": "2026-04-15T12:00:00Z", "consent_source": "example", "tracking_consent": true, "tracking_consent_at": "2026-04-15T12:00:00Z" }'Required scope: subscriptions:write
Subscribes without double opt-in: lifts an opt-out from the suppression list
when its reason is ‘unsubscribe’, ‘shop_unsubscribe’ or
‘legacy_unsubscribe’ and restores the mailable status.
Legal blocks, bounces, manual blocks, complaints and GDPR-deleted addresses stay (409).
The call is recorded in the organisation’s consent log (channel api_subscribe,
the token label as actor).
Shops with write-back hear of the subscribe only when you state the consent with
consent_at, or when the organisation switched on write-back for API subscribes
without consent details (default: off). consent_at becomes the recipient’s consent
date (consent_source as api:<source>) unless a newer one is stored, also for an
address that is already subscribed. A consent_at not after the opt-out it would
lift is refused (409): the opt-out withdrew that consent.
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
The audience to work on, by its identifier (aud_ plus 12 characters): in the app under Settings > Preference
Center > General (and Settings > API with Custom Audiences on), or as id in GET /audiences. The first audience’s identifier, or none, addresses the newsletter. A
Custom Audience’s table has no shop
figures (total_revenue, order_count, first_order_date, last_order_date: 422); the organisation’s
custom fields exist there too (since 2.3.0); its
doi_status is one of pending, confirmed, not_required, unsubscribed, cleaned. A newsletter opt-out does
not block an audience; complaints, bounces and legal blocks do.
Example
aud_xxxxxxxxxxxxWhen the person consented to the newsletter in your system (not in the future). With it the subscribe is passed on to the shops with write-back.
Where that consent was given (e.g. checkout), stored as api:<source>
Tracking consent (opens/clicks) from your system; needs tracking_consent:write. Same rules as a file import: without tracking_consent_at it never changes a stored decision; false only withdraws an older consent; a withdrawal the person made in rocketEM is never lifted. For single withdrawals use PUT /recipients/tracking-consent.
When the person decided in your system (not in the future)
Responses
Abschnitt betitelt „Responses“Subscription status
object
object
The opt-out that was lifted, or subscribed when the address was not blocked (nothing changed). For an audience row its previous doi_status (unsubscribed, cleaned).
Only when tracking_consent was sent; failed = the recipient change was saved, the consent was not (send it again)
Example
{ "data": { "status": "subscribed", "previous_status": "subscribed", "tracking_consent": "granted" }}Tracking_consent sent without the tracking_consent:write scope
Resource not found
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}Cannot re-subscribe (legal block, block_all, Robinson list, bounce, manual block, complaint, or GDPR-deleted)
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}