Skip to main content
POST
/
api
/
v3
/
store
/
newsletter_subscribers
Spree SDK
import { createClient } from '@spree/sdk'

const client = createClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const subscriber = await client.newsletterSubscribers.create({
  email: 'subscriber@example.com',
  redirect_url: 'https://your-store.com/newsletter/confirm',
})
curl --request POST \
--url http://{defaultHost}/api/v3/store/newsletter_subscribers \
--header 'Content-Type: application/json' \
--header 'x-spree-api-key: <api-key>' \
--data '
{
"email": "subscriber@example.com",
"redirect_url": "https://your-store.com/newsletter/confirm"
}
'
{
  "id": "sub_UkLWZg9DAJ",
  "email": "philip.jast@schadenhamill.biz",
  "created_at": "2026-07-11T15:39:29.709Z",
  "updated_at": "2026-07-11T15:39:29.711Z",
  "verified": true,
  "verified_at": "2026-07-11T15:39:29Z",
  "customer_id": "cus_UkLWZg9DAJ"
}
{
"error": {
"code": "validation_error",
"message": "Email is invalid",
"details": {
"email": [
"is invalid"
]
}
}
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Headers

x-spree-api-key
string
required
Authorization
string

Optional Bearer JWT — when present, links the subscription to that customer

Body

application/json
email
string<email>
required
Example:

"subscriber@example.com"

redirect_url
string<uri>

Storefront URL the verification token should be appended to. Silently omitted from the webhook payload when the store has allowed origins configured and this URL does not match one of them, or when no allowed origins are configured at all.

Example:

"https://your-store.com/newsletter/confirm"

Response

auto-verified when JWT matches subscribed email

id
string
required
email
string
required
created_at
string
required
updated_at
string
required
verified
boolean
required
verified_at
string | null
required
customer_id
string | null
required