Documentation
Quick Start.
Send your first email with SMTPfast in under two minutes.
Overview
#SMTPfast is a developer-first email API built for speed and simplicity. Send transactional emails, manage sending domains, and track delivery events through a clean REST API.
The API is compatible with Resend, so you can switch with minimal code changes.
Base URL
#https://smtpfa.st/api/v1All endpoints described in these docs are relative to this base URL.
Authentication
#Every request requires a Bearer token in the Authorization header. Create an API key from your dashboard or via the API.
Authorization: Bearer sf_live_your_api_keySend Your First Email
#Make a POST request to /v1/emails with the recipient, subject, and body.
Verify your sending domain first.
A send from a domain you have not verified is refused with403 and the message Domain is not verified. Add it on the Domains page, publish the DNS records, and then come back here. The example below uses yourapp.com; replace it with a domain you own.curl -X POST https://smtpfa.st/api/v1/emails \
-H "Authorization: Bearer sf_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Welcome!",
"html": "<h1>Hello from SMTPfast!</h1>"
}'const res = await fetch("https://smtpfa.st/api/v1/emails", {
method: "POST",
headers: {
Authorization: "Bearer sf_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
from: "[email protected]",
to: ["[email protected]"],
subject: "Welcome!",
html: "<h1>Hello from SMTPfast!</h1>",
}),
});
const { id } = await res.json();
console.log("Sent:", id);import requests
res = requests.post(
"https://smtpfa.st/api/v1/emails",
headers={
"Authorization": "Bearer sf_live_your_api_key",
"Content-Type": "application/json",
},
json={
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Welcome!",
"html": "<h1>Hello from SMTPfast!</h1>",
},
)
data = res.json()
print("Sent:", data["id"])Response Format
#Responses are JSON, apart from exports such as /v1/contacts/export which returns CSV. A successful request returns 200, or 201 when it created something. An error carries an error field with a message that describes the issue; the HTTP status code says what kind of error it is.
Success
{
"id": "email_abc123"
}Error
{
"error": "Invalid API key"
}Next Steps
#SDKs →
Official Node.js, Python, Go and PHP SDKs, and a Laravel mail driver
Authentication →
API key scopes and security
Emails API →
Send and retrieve emails
Contacts API →
Manage subscribers, properties, and segments
Broadcasts API →
Create, target, schedule, and measure campaigns
Templates API →
Write an email once with variables and send it by alias
Domains API →
Add and verify sending domains
Resend Compatibility →
Switch from Resend in minutes