Send Templated Email
POST/api/store-email-templates/send
Send an email to the customer (sales order) or supplier (purchase order, vendor credit) using a store email template.
settings:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Body fields:
- order_type (required): SalesOrder | PurchaseOrder | VendorCredit
- order_id (required): ID of the record to email
- subject (required): rendered subject line
- html_body (required): rendered HTML email body
- cc (optional): array of CC email addresses (null/blank entries are dropped)
- attachments (optional): array of document keys to attach (resolved per the entity's attachable-documents registry)
- store_id (optional): ID of the store whose email address is used as the sender ("from"). When omitted, falls back to the record's own store, then the tenant's default (oldest active) store.
Errors:
- 422 store_sender_missing: no store with a sender email address is configured. The error payload includes errors.store[0].data.configure_route pointing to where stores are managed.
Request
Responses
- 200
- 400
- 401
- 403
- 422
- 429
OK
Response Headers
Bad Request
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.