Required
to, subject, and either text or html. If no sender is supplied, KasaPost uses the domain default.
The KasaPost API accepts product email through scoped API keys while keeping sender identity, logs, suppressions, and deliverability checks connected to the mailbox domain.
Authenticate with a KasaPost API key. The sender must belong to the API key domain. Use from_name or a formatted from value for display names. The static OpenAPI draft is available at /openapi.json.
curl https://mail.kasapost.com/api/v2/kasapost/send/ \
-H "Authorization: Bearer kp_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"from": "KasaPost ",
"to": ["customer@example.com"],
"subject": "Welcome to KasaPost",
"text": "Your mailbox and sending lane are ready.",
"html": "<p>Your mailbox and sending lane are ready.</p>"
}'
to, subject, and either text or html. If no sender is supplied, KasaPost uses the domain default.
from, from_email, from_name, cc, bcc, reply_to, and safe custom headers.
Successful accepts return HTTP 202 with message ID, sender, recipient, subject, status, event, and log metadata.
Webhook endpoints can receive accepted, failed, suppressed, and related delivery events for product workflows.
Blocked recipients are checked before sending so known bad addresses do not keep hurting reputation.
Daily key limits and reputation policy protect new domains from sudden volume spikes.
Until formal SDK packages are published, the API is simple enough to call directly from product code. These examples are intentionally plain so customers can inspect the exact request being sent.
const response = await fetch('https://mail.kasapost.com/api/v2/kasapost/send/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.KASAPOST_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'KasaPost <hello@kasapost.com>',
to: ['customer@example.com'],
subject: 'Welcome to KasaPost',
text: 'Your mailbox and sending lane are ready.'
})
});
if (!response.ok) throw new Error(await response.text());