1. Get an address to send from
Find the business’s email addresses and their IDs, which start withea_:
- In test mode, each new business gets a test address at
dev.pflowsemail.comautomatically, so you can send straight away. - In live mode, emails come from the business’s own domain. Set up the domain and create an address on it by following Set up custom domains. DNS changes can take up to 48 hours, so start this early.
422.
2. Create a template
Create a template with aname, a subject and the email’s HTML. Both the subject and the HTML can
use personalization variables:
id.
3. Send it
Send the template to the customer, from the address you chose:ok set to
true. If the email can’t be sent, the request fails with 422 and the reason in errors, for
example a personalization variable without a value.
To send to an address that isn’t a customer, pass to in place of customer. The template then has
no customer data, so pass any values it uses in variables:
Things to know
- It’s meant for tests and one-offs. Each business can send 100 emails this way in any 24 hours.
Past that, the request returns
429. - It doesn’t check consent. The email goes to the recipient even if they unsubscribed. See Respect customer consent.
- Test mode still delivers. Send to an address you control.
- Retries. Send an idempotency key so a retried request doesn’t send the email twice.