Search Documentation
Search for a documentation page...
Subscribers API
REST API endpoints for newsletter subscriber management.
List Subscribers
Returns a paginated subscriber list with per-subscriber purchase stats (orderCount, totalSpent, lastOrderAt) for audience segmentation. The sensitive unsubscribe token is never returned.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Subscribers per page (1-100) |
offset | number | 0 | Subscribers to skip |
status | string | all | Filter by status: all, active, or unsubscribed |
query | string | — | Search by email or name |
Response
Create Subscriber
Adds an email address to the store's subscriber list. If the email is already subscribed, returns a 200 with { status: "already_subscribed" } instead of creating a duplicate.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Subscriber email address |
name | string | No | Subscriber display name |
Response (201)
Already Subscribed (200)
Import Subscribers
Bulk-adds subscribers — the programmatic equivalent of the dashboard CSV import. Up to 1000 subscribers per request. The mode field controls handling of emails that already exist.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
subscribers | array | Yes | Subscribers to import (1-1000) |
subscribers[].email | string | Yes | Subscriber email address |
subscribers[].name | string | No | Subscriber display name |
subscribers[].location | string | No | Free-text location |
mode | string | No | How to handle existing emails: skip (default) or update (refresh name/location) |
Response (200)
A 403 is returned with { error, limit, count } when the subscriber limit for your plan is reached.
Delete Subscriber
Unsubscribes an email address.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email to unsubscribe |