Postwing exposes a small REST API over HTTPS. Send a single POST request to api.postwing.app and the message goes out — no SDK or SMTP client required. There are two endpoints: send a ready-made message (raw), or render and send one of your saved templates.
Authentication uses the same domain token as the SMTP relay — pass it in the auth object on every request (username and password). Set an idempotency_key to make retries safe: repeating a request with the same key never sends a duplicate. The endpoints respond with ok: true on success, or error_code and error describing what went wrong.
Sending email without processing on the API side. Use it to send HTML emails to your customers
{
"recipient": "[email protected]",
"subject": "Subject",
"body": "Email Content",
"sender": "from me <[email protected]>",
"idempotency_key": "xxxxxx",
"auth": {
"username": "Username",
"password": "Password"
}
}{
"ok": true,
"error_code": "error code",
"error": "error details"
}Sending generated email from specific template. You will need to provide used placeholders in template and specify the language.
{
"recipient": "[email protected]",
"tpl": "tpl slug",
"lang": "en",
"sender": "from me <[email protected]>",
"idempotency_key": "xxxxxx",
"params": {
"prop1": "value"
},
"auth": {
"username": "Username",
"password": "Password"
}
}{
"ok": true,
"error_code": "error code",
"error": "error details"
}