#Email sending
GET /email-sending
Get whether the organization's email to its customers is going out. Meisei holds marketing email when the store's bounce or complaint rate over the last two weeks passes its limit, holds every customer email past a higher one or when the email provider pauses the store, and spreads a new store's marketing email over its first weeks of sending. Email to your team is never held.
Requires the settings:read permission.
Request
curl \
"https://your-store.meisei.app/api/email-sending" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY"Request
import { client } from "@meisei/api/admin/client"
import { getEmailSending } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await getEmailSending()Request
require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.email_sending.retrieveRequest
from meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.email_sending.retrieve()Response
{
"status": "active",
"reason": "provider",
"providerPause": {
"pausedAt": "2025-01-15T09:30:00Z",
"cause": "string"
},
"windowDays": 0,
"sent": 0,
"bounceRate": 0,
"complaintRate": 0,
"minimumSent": 0,
"limits": {
"marketing": {
"bounceRate": 0,
"complaintRate": 0
},
"transactional": {
"bounceRate": 0,
"complaintRate": 0
}
},
"dailyLimit": 0,
"sentToday": 0
}Response schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": ["active", "marketing-paused", "paused"],
"description": "Whether email to your customers is going out. `marketing-paused` holds review requests and loyalty reminders while redeemed codes and answers still go. `paused` holds every email to your customers. Email to your team is never held."
},
"reason": {
"anyOf": [
{
"type": "string",
"enum": ["provider", "bounces", "complaints"]
},
{
"type": "null"
}
],
"description": "Why sending is held: `bounces` or `complaints` when the rate over the window is past Meisei's limit, `provider` when the email provider has paused this store's sending. Null while sending is active."
},
"providerPause": {
"anyOf": [
{
"type": "object",
"properties": {
"pausedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the email provider paused sending."
},
"cause": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The provider's own explanation, when it gave one."
}
},
"required": ["pausedAt", "cause"],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "The email provider's pause, or null when it has not paused this store."
},
"windowDays": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "How many days the rates below are measured over."
},
"sent": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Emails to your customers sent over the window."
},
"bounceRate": {
"type": "number",
"description": "Hard bounces over the window, as a fraction of emails sent (0.02 is 2 percent)."
},
"complaintRate": {
"type": "number",
"description": "Spam complaints over the window, as a fraction of emails sent."
},
"minimumSent": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Below this many sends over the window, the rates never hold anything."
},
"limits": {
"type": "object",
"properties": {
"marketing": {
"type": "object",
"properties": {
"bounceRate": {
"type": "number",
"description": "The bounce rate at which marketing email pauses."
},
"complaintRate": {
"type": "number",
"description": "The complaint rate at which marketing email pauses."
}
},
"required": ["bounceRate", "complaintRate"],
"additionalProperties": false
},
"transactional": {
"type": "object",
"properties": {
"bounceRate": {
"type": "number",
"description": "The bounce rate at which every email pauses."
},
"complaintRate": {
"type": "number",
"description": "The complaint rate at which every email pauses."
}
},
"required": ["bounceRate", "complaintRate"],
"additionalProperties": false
}
},
"required": ["marketing", "transactional"],
"additionalProperties": false,
"description": "The rates at which Meisei holds a store's email."
},
"dailyLimit": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "While a store is new to sending, how many marketing emails go out per UTC day. Emails over it wait for the next day. Null once the ramp is over."
},
"sentToday": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Emails to your customers sent so far this UTC day."
}
},
"required": [
"status",
"reason",
"providerPause",
"windowDays",
"sent",
"bounceRate",
"complaintRate",
"minimumSent",
"limits",
"dailyLimit",
"sentToday"
],
"additionalProperties": false,
"description": "Where the organization's email to its customers stands."
}