Postmark libraries
Point a Postmark client at Prawnwire's supported endpoints.
Prawnwire uses Postmark’s message format on its sending and activity endpoints. Review the compatibility table before changing an existing integration.
postmark.js
The request-host configuration has been verified with postmark 5.1.0 for sendEmail, sendEmailBatch, and getOutboundMessages.
Install postmark@5.1.0, then select the postmark.js tab:
curl 'https://api.prawnwire.com/v1/email' \
-H "Authorization: Bearer $PRAWNWIRE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"From": "hello@yourdomain.com",
"To": "ada@example.com",
"Subject": "Welcome to your account",
"TextBody": "Hi Ada, your account is ready."
}' const response = await fetch(
'https://api.prawnwire.com/v1/email',
{
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.PRAWNWIRE_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"From": "hello@yourdomain.com",
"To": "ada@example.com",
"Subject": "Welcome to your account",
"TextBody": "Hi Ada, your account is ready."
}),
},
)
const result = await response.json()
if (!response.ok) throw new Error(JSON.stringify(result))
console.log(result) The prawnwire SDK is publishing soon. This example uses built-in fetch in Node 18 or newer.
import postmark from 'postmark'
const client = new postmark.ServerClient(
process.env.PRAWNWIRE_API_KEY,
{ requestHost: 'api.prawnwire.com/v1' },
)
const result = await client.sendEmail({
"From": "hello@yourdomain.com",
"To": "ada@example.com",
"Subject": "Welcome to your account",
"TextBody": "Hi Ada, your account is ready."
})
console.log(result) requestHost is the API host including /v1 but without https://. The client uses HTTPS by default and sends X-Postmark-Server-Token. Use a Prawnwire API key, not a Postmark server token.
The current base URL is https://api.prawnwire.com/v1. Staging’s requestHost is api.prawnwire.dev/v1; production’s is api.prawnwire.com/v1.
Other languages
Postmark clients in other languages should work for the supported wire-format endpoints by changing the host or base URL and using a Prawnwire key. They have not been verified here. Check whether the client expects a full URL or a host, and whether it preserves the /v1 prefix.
Do not assume template, inbound, tracking, or webhook methods work. Do not point account-management methods from a Postmark library at /v1/me, /v1/domains, or /v1/members; those endpoints use Prawnwire’s own format.
Verify your integration
Use an organization-specific test key first. Confirm the request path, headers and returned ErrorCode. A test response does not appear in activity. Then use a live key to send to an address you control and inspect its message events.