Send Email
/api/emailsQueues a plain transactional email in the store's name. Core renders the subject, heading, paragraphs, optional https button and footer into its own template, escaping every field; the plugin supplies no markup. Without a reason, the recipient must be the store's customer or team member; with reason invite or account-notice, any address. Rate-limited per store, with a smaller budget shared by emails sent with a reason and refused sends. A repeated idempotencyKey answers the first send's id when the email is the same and is refused when it differs. Delivered by core's outbox, normally within minutes. Requires the store to have granted the plugin emails:send.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
length <= 254Value in
- "invite"
- "account-notice"
1 <= items <= 20Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/emails" \ -H "Content-Type: application/json" \ -d '{ "to": "string", "subject": "string", "heading": "string", "paragraphs": [ "string" ] }'{ "emailId": "string"}List GET
The store's customers, newest first, at most 100 a page: each with their email, whether they verified it, when they joined and how many of their orders were paid for. `createdAfter` (inclusive) and `createdBefore` (exclusive) bound when they joined. Pass a page's `nextCursor` back as `cursor`, with the same filters, for the page after it; it is null on the last page. Customers who join while you page through are newer than the first page, so the pages after it neither skip nor repeat a customer. Requires the store to have granted the plugin customers:list.
Send Email To Sellers POST
Queues a plain transactional notice to the store's own sellers, rendered like SendEmail. Core resolves the recipients from the store's team (audience team, the default) or its owner (audience owner), only verified addresses, and never returns them. The team is the owner and the members who may open the plugin's app; a member kept out of the app, or out of an area its granted permissions reach, such as orders, gets nothing: the answer is one email id per recipient and their count. Each recipient counts against the store's hourly budget, and the whole send is refused if it does not fit. A repeated idempotencyKey with different content is refused. Requires the store to have granted the plugin emails:send.
