Send Email
Send a single transactional email using the FWD API. Supports HTML content, plain text, template rendering, custom sender domains, and reply-to addresses.
POST/api/send
Authentication
Include your API key in the x-api-key request header. Keys are created in the dashboard and have a fwd_ prefix.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| to | string | Required | Recipient email address |
| subject | string | Required | Email subject line (not required if using templateId) |
| html | string | Required | HTML email body (or provide text, or use templateId) |
| text | string | Optional | Plain text fallback body |
| from | string | Optional | Custom sender address (requires verified domain) |
| replyTo | string | Optional | Reply-to email address |
| templateId | string | Optional | Use a saved template by ID |
| variables | object | Optional | Key-value pairs for template variable substitution |
Example Request
cURL
curl -X POST https://fwd.sarthak.online/api/send \
-H "x-api-key: fwd_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com",
"subject": "Order Confirmed",
"html": "<h1>Order #1234</h1><p>Your order has been confirmed.</p>",
"replyTo": "support@yourcompany.com"
}'Using Templates
Instead of providing subject and html directly, reference a saved template by ID and pass variables for dynamic content.
Template-based send
curl -X POST https://fwd.sarthak.online/api/send \
-H "x-api-key: fwd_your_key" \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com",
"templateId": "tmpl_abc123",
"variables": {
"name": "John",
"orderNumber": "#1234"
}
}'Custom From Address
By default, emails are sent from noreply@fwd.sarthak.online. To send from your own domain, first verify it in the Domains section, then pass the from field.
Custom sender
{
"to": "user@example.com",
"from": "Hello Team <hello@yourdomain.com>",
"subject": "Welcome!",
"html": "<p>Hello from our domain.</p>"
}Response
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the email was accepted |
| emailId | string | Unique identifier for this email |
| messageId | string | Queue message ID |
| status | string | "queued" in production, "sent" in development |
| rateLimit.limit | number | Your monthly email limit |
| rateLimit.remaining | number | Emails remaining this month |
Suppression List
Emails to addresses on the suppression list (bounced or complained) are automatically blocked and return a 400 error. This protects your sender reputation.
Open tracking
FWD automatically injects a 1×1 tracking pixel into HTML emails to track opens. Unsubscribe links are also injected for CAN-SPAM compliance in batch emails.