If your shop, your portal or your own script needs to send somebody a single email — an order confirmation, a shipping update, an invoice, a "your account is ready" note — you can hand it to us and we will send it.
You do not need a flow and you do not need a campaign. One request, one email.
If you run WooCommerce you may not need this page at all. The plugin can take over WordPress's own mail with one switch and no code — see "Send your WordPress and WooCommerce emails through us". This page is for everything else: a portal, a separate app, a script that runs overnight.
ae_live_. Keep it on your server.Never put a server key in a web page. Anything printed in page source can be read by anybody, and a server key can send mail as you.
This is a whole working example. Paste your own key in, change the address, and run it.
Every request with a server key has to be signed — two extra headers, a timestamp and a signature made with your key. The example below does it with openssl. "Connect a custom-built store with the API" explains it, with the same thing in Node.
KEY='PASTE-YOUR-SERVER-KEY-HERE'
BODY='{
"to":"buyer@yourstore.com",
"subject":"Your order is on its way",
"html":"Thanks — order 1044 shipped today. Tracking: 9400 1000 0000 0000",
"idempotencyKey":"order-1044:shipped"
}'
TS=$(date +%s)
SIG=$(printf '%s' "$TS.$BODY" \
| openssl dgst -sha256 -hmac "$KEY" -hex | sed 's/^.* //')
curl -sS https://app.aminoengine.com/api/v1/send \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-H "X-AE-Timestamp: $TS" \
-H "X-AE-Signature: sha256=$SIG" \
--data "$BODY"
The answer is one line:
{ "messageId": "8f2c…", "state": "queued", "deduplicated": false }
messageId is the same id you will see under Messages, with its delivery status beside it. state: "queued" means we have it and it is on its way out — Messages is where you find out whether it was actually delivered.
Three things worth knowing:
idempotencyKey stops duplicates. Send the same key twice and the second one comes back with deduplicated: true instead of being sent again. Use something that identifies the event — the order number and what happened to it is ideal. If your script retries after a timeout, nobody gets two copies.html for "templateId" and a "variables" object, and we render your design with your branding and fill in the blanks. The id is in the address bar of that design's page.{"messages": [ ... ]}. A batch always answers 200 with a result for each one, so a single bad address never stops the other forty-nine, and your script never retries forty-nine emails to fix one.It goes out on the receipts side of the system, which means it is not held back by somebody's marketing unsubscribe, does not need consent, does not count towards your sending limit and carries no unsubscribe footer. See "Receipts and marketing are two different things" for what that does and does not cover.
Still stuck? Email support@aminoengine.com with the message id and we will tell you exactly what happened to it.