Manage newsletter subscribers via the xoPort REST API. Supports double opt-in, provider synchronization (Cleverreach, Mailchimp, Optimizely), and GDPR-compliant privacy logging. Available since version 2.8.0.
Newsletter Subscriber Endpoint
Newsletter Subscribers
Manage newsletter subscribers with double opt-in (DOI), automatic provider synchronization, and GDPR-compliant privacy logging.
GET /Export/JSON/newsletter_subscribers
GET /Export/JSON/newsletter_subscriber/{id}
POST /Import/JSON/newsletter_subscribers
PUT /Import/JSON/newsletter_subscribers
DELETE /Delete/JSON/newsletter_subscriber/{id}Endpoints
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /Export/JSON/newsletter_subscribers | newsletter:read | List all subscribers (with filters) |
| GET | /Export/JSON/newsletter_subscriber/{id} | newsletter:read | Retrieve a single subscriber |
| POST | /Import/JSON/newsletter_subscribers | newsletter:write | Create a new subscriber (DOI support) |
| PUT | /Import/JSON/newsletter_subscribers | newsletter:write | Update an existing subscriber |
| DELETE | /Delete/JSON/newsletter_subscriber/{id} | newsletter:delete | Delete subscriber (GDPR cascade) |
| DELETE | /Delete/JSON/newsletter_subscribers | newsletter:delete | Delete multiple subscribers (JSON body) |
Query Filter (Export)
| Parameter | Description | Example |
|---|---|---|
?status=confirmed | Filter by confirmation status | confirmed or unconfirmed |
?email=example.com | Part of the email address; % and _ count as plain characters | contains |
?customer_id=42 | Only subscribers of these customers | Customer ID; starting with API version 2.122.10, also as a comma-separated list |
?language_id=1 | Filter by language | Language ID; starting with API version 2.122.10, also as a comma-separated list |
?last_modified=2026-01-01 | Delta since the given point in time: modified, confirmed via double opt-in, or transfer to the newsletter provider still pending (starting with API version 2.122.10) | YYYY-MM-DD, YYYY-MM-DD HH:MM or YYYY-MM-DD HH:MM:SS, optionally with time zone |
Starting with API version 2.122.10: Invalid values, list values such as ?status[]=, and points in time outside the fixed formats result in an HTTP 400 error INVALID_FILTER_VALUE with no data; an empty value is considered unset. The list is paginated in the database using ?limit= and ?offset=; stats.total returns the number of matches. Deleted and unsubscribed addresses are not included in any delta, so perform a full synchronization regularly.
Features
Double Opt-In
Respects the store configuration SHOP_NEWSLETTER_DOUBLE_OPT_IN. When DOI is enabled, a confirmation email is sent automatically.
Provider Sync
Automatic synchronization with external newsletter providers (CleverReach, Mailchimp, Optimizely) via xoNewsletter.
GDPR Compliance
Privacy logging during import and deletion. Cascade deletion documents all steps in compliance with data protection regulations.
Subscription, Confirmation, and Locks
Starting with API version 2.122.9 (Shop 4.9.168), the import no longer lifts an objection to advertising or a newsletter lock.
| Case | Behavior |
|---|---|
| Address with a newsletter lock or objection | POST rejects the record: NEWSLETTER_LOCKED or OPTED_OUT for clients with customers:read, otherwise NOT_SUBSCRIBABLE. An unsubscribed address can only be re-subscribed using send_doi. Starting with API version 2.122.11 (Shop 4.9.171), the message for NEWSLETTER_LOCKED names the way to lift the lock: PUT /customers with customers_nl_lock = 0. This only lifts the lock, not an objection: if the lock removed a subscription, the address needs send_doi afterwards. |
| Double opt-in enabled in the store | A POST without subscribe_confirm sends the confirmation email itself, at most one per address within 24 hours. A list without a time of consent therefore triggers an email for each new address. |
subscribe_confirm | Only a fixed point in time or yes/no. A zero date, relative or future values result in INVALID_FIELD_VALUE. |
send_doi | Explicitly sends the confirmation email. Response per record in records[].confirmed and records[].doi_mail; codes DOI_UNAVAILABLE and DOI_MAIL_THROTTLED, warnings CONFIRMED_WITHOUT_DOI, DOI_MAIL_FAILED, and SUBSCRIBE_CID_MISMATCH. |
PUT | No longer confirms anything (FIELD_IGNORED_ON_UPDATE). subscribe_cid can only be set to an account with the same address or to 0. |
?_strict=true | An unknown field results in an HTTP 400 error before anything is written. |
Stores using API versions prior to 2.122.9 do not recognize send_doi but create the record anyway: first check api_version via GET /me.
Example: Create a subscriber
# POST - Create a new subscriber with DOI
curl -X POST "https://shop.de/xpanel/xoport/Import/JSON/newsletter_subscribers" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "newsletter_subscribers",
"data": [{
"subscribe_email": "kunde@example.com",
"subscribe_firstname": "Max",
"subscribe_lastname": "Mustermann",
"subscribe_language_id": 1
}]
}'Note: If DOI is enabled, the subscriber is initially created as “unconfirmed” and receives a confirmation email. The subscribe_status_key field (security token) is not returned in the export.
Bulk Delete
# Delete multiple subscribers via JSON body
curl -X DELETE "https://shop.de/xpanel/xoport/Delete/JSON/newsletter_subscribers" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "newsletter_subscribers",
"data": [
{"subscribe_id": 5},
{"subscribe_email": "abmelden@example.com"}
]
}'Subscribers can be identified via subscribe_id or subscribe_email. Each deletion is logged as a GDPR privacy event.
Starting with API version 2.122.9, the deletion process checks the result with the newsletter provider. If the unsubscribe fails there, the single path returns HTTP 502 NEWSLETTER_UNSUBSCRIBE_FAILED and the batch reports the error in errors[]; an HTTP 404 from the provider counts as unsubscribed. If no newsletter provider is used, the store deletes all rows associated with the address and stores an objection to advertising.