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.
This credential is for sending only. The domain token authenticates one domain on the /external/ endpoints and the SMTP relay, and is passed in the request body. The account API under /api/ — domains, templates, webhooks, logs, inbound messages and their attachments — is a different scheme: an Authorization header carrying your account token, which lives on Dashboard → Profile.
Postwing assigns each message its own Message-ID (<uuid@yourdomain.com>) and returns it — that is the id every delivery webhook reports. You cannot set your own: the accepted extra headers are In-Reply-To, References, Reply-To and any X- header, and anything else is refused.
Sending email without processing on the API side. Use it to send HTML emails to your customers
{
"recipient": "email@test.com",
"subject": "Subject",
"body": "Email Content",
"sender": "from me <email@test.com>",
"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@test.com",
"tpl": "tpl slug",
"lang": "en",
"sender": "from me <email@test.com>",
"idempotency_key": "xxxxxx",
"params": {
"prop1": "value"
},
"auth": {
"username": "Username",
"password": "Password"
}
}{
"ok": true,
"error_code": "error code",
"error": "error details"
}