Get sending settings
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/account/sendingCosts 1 rate-limit point · Rate limits
Who sends each customer notification, and STOQ's own sending settings. notifications nests each channel under its notification: back_in_stock (signup_thank_you, restock_alert, reminder) and preorders (confirmation, shipping_update, payment_failed), each channel with sender (who sends it right now, worked out by the same code the sender runs; null means it is not sent) and fallback_reason (why the sender is not the chosen email_provider or sms_provider: credentials_missing, flow_unverified, flow_trigger_disabled, flow_not_supported, custom_html_template). stoq is STOQ's own email and SMS. sent_from is the From of STOQ's own emails, as the dashboard shows it: name (email_from_name, with " (STOQ)" added while mail goes from STOQ's addresses), back_in_stock and preorders (the address each sends from) and yahoo_outlook_hotmail_recipients. email_from_address is the merchant's own address once verified (then every email goes from it), else null. Also returns the custom sending domain and its DKIM check, and whether STOQ lets the shop send: email_allowed (false when STOQ has blocked the shop's email), sms_allowed (SMS approved) and sms_restricted_content_verified (staff reviewed the SMS content). STOQ sets these three; they cannot be written. sending_paused, present only when STOQ blocks a channel, says alerts on it will not go out. custom_address_status says where sending from the merchant's own address stands: not_set (use_custom_email_address is off or no address of their own), pending (DKIM for the address's domain is not verified yet, so mail goes from STOQ's address) or verified (mail goes from the merchant's address). sender_domain is where the sending domain stands, from Amazon SES and a DNS lookup of each record (checked at most every 5 minutes; checked_at says when): status (verified, pending, failed, not_started, not_set, error), ses_dkim_status (SES's own word), records (each CNAME with host, expected, found and status ok, missing, wrong_value or lookup_failed), next_step (add_records, fix_records, wait_for_ses, restart_verification, none) and in_use (verified and the plan allows a custom sender). POST /account/sending/verify_domain checks again now. sender_address is the merchant's own address to send from, null on STOQ's default address. reply_to_address is where customer replies go: the Reply-To on every customer email STOQ sends. It is sender_address when set, otherwise the store's customer email in Shopify. Replies never go to STOQ.
A notification is listed under notifications only when the shop has its alert template, so preorders is {} on a shop with no preorder template. Each channel also carries enabled (the template is on) and integration (the provider it was meant to go through). sending_paused has channels (email, sms) and a note to relay. Change providers and addresses with PATCH /account/sending.
Also searched asemail providersms providersender addressfrom addresscustom sending domainsending settingswho sends my notificationsis klaviyo sending my alertswhy did stoq send instead of klaviyois my sender address verifiedwhy are emails not sent from my addressreply-to addresswhere do customer replies godkim recordsis my sending domain verifiedwhich dns record is missing
Returns
email_providerstringExample:stoqsms_providerstringExample:stoqemail_from_namestring, nullableExample:Stride Supplyuse_custom_email_addressbooleanExample:truesender_addressstring, nullableExample:hello@stridesupply.comsms_custom_domain_enabledbooleanExample:trueklaviyo_skip_auto_subscribebooleanExample:falseemail_from_addressstring, nullableExample:hello@stridesupply.comemail_subdomainstring, nullableemail_dkim_verifiedbooleanExample:truesms_allowedbooleanExample:trueemail_allowedbooleanExample:truereply_to_addressstringExample:hello@stridesupply.comsms_restricted_content_verifiedbooleanExample:truecustom_address_statusstringExample:verifiedsent_fromobjectShow 4 child attributesHide child attributes
namestringExample:Stride Supplyback_in_stockstringExample:hello@stridesupply.compreordersstringExample:hello@stridesupply.comyahoo_outlook_hotmail_recipientsstringExample:hello@stridesupply.com
notificationsobjectShow 2 child attributesHide child attributes
back_in_stockobjectShow 3 child attributesHide child attributes
signup_thank_youobjectShow 2 child attributesHide child attributes
emailobjectShow 4 child attributesHide child attributes
senderstringfallback_reasonstring, nullableintegrationobject, nullableenabledboolean
smsobjectShow 4 child attributesHide child attributes
senderstring, nullablefallback_reasonstring, nullableintegrationobject, nullableenabledboolean
restock_alertobjectShow 2 child attributesHide child attributes
emailobjectShow 4 child attributesHide child attributes
senderstringExample:stoqfallback_reasonnullintegrationobject, nullableenabledbooleanExample:true
smsobjectShow 4 child attributesHide child attributes
senderstring, nullableExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
reminderobjectShow 2 child attributesHide child attributes
emailobjectShow 4 child attributesHide child attributes
senderstringExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
smsobjectShow 4 child attributesHide child attributes
senderstring, nullableExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
preordersobjectShow 3 child attributesHide child attributes
confirmationobjectShow 2 child attributesHide child attributes
emailobjectShow 4 child attributesHide child attributes
senderstringExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
smsobjectShow 4 child attributesHide child attributes
senderstring, nullableExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
shipping_updateobjectShow 1 child attributeHide child attributes
emailobjectShow 4 child attributesHide child attributes
senderstringExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
payment_failedobjectShow 1 child attributeHide child attributes
emailobjectShow 4 child attributesHide child attributes
senderstringExample:stoqfallback_reasonstring, nullableintegrationobject, nullableenabledbooleanExample:true
sending_pausedobjectShow 2 child attributesHide child attributes
channelsarray of stringsnotestring
Errors
not_foundThe path is valid but nothing with that id exists in this store.
validation_failedThe request failed validation.
shopify_rate_limitedShopify throttled the store's Admin API, so the call was not made.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/account/sending" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/account/sending", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/account/sending",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/account/sending")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"email_provider": "stoq",
"sms_provider": "stoq",
"email_from_name": "Stride Supply",
"use_custom_email_address": true,
"sender_address": "hello@stridesupply.com",
"sms_custom_domain_enabled": true,
"klaviyo_skip_auto_subscribe": false,
"email_from_address": "hello@stridesupply.com",
"email_subdomain": null,
"email_dkim_verified": true,
"sms_allowed": true,
"email_allowed": true,
"reply_to_address": "hello@stridesupply.com",
"sms_restricted_content_verified": true,
"custom_address_status": "verified",
"sent_from": {
"name": "Stride Supply",
"back_in_stock": "hello@stridesupply.com",
"preorders": "hello@stridesupply.com",
"yahoo_outlook_hotmail_recipients": "hello@stridesupply.com"
},
"notifications": {
"back_in_stock": {
"restock_alert": {
"email": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
},
"sms": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
}
},
"reminder": {
"email": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
},
"sms": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
}
}
},
"preorders": {
"confirmation": {
"email": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
},
"sms": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
}
},
"shipping_update": {
"email": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
}
},
"payment_failed": {
"email": {
"sender": "stoq",
"fallback_reason": null,
"integration": null,
"enabled": true
}
}
}
}
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}