Loading...
Loading...
/api/v1/emailsSend a single email to one or more recipients. This is the primary endpoint for sending transactional emails from your application.
curl -X POST https://notifyn.net/api/v1/emails \
-H "Authorization: Bearer ntfn_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com",
"subject": "Hello World",
"html": "<h1>Hello!</h1><p>This is a test email.</p>",
"text": "Hello! This is a test email."
}'| Parameter | Type | Description |
|---|---|---|
torequired | string | string[] | Recipient email address. For multiple recipients, send as an array. Max 50. |
subjectrequired | string | Email subject line. Maximum 998 characters. |
html | string | HTML content of the email. Either html or text is required. |
text | string | Plain text content of the email. Either html or text is required. |
replyTo | string | string[] | Reply-to email address. For multiple addresses, send as an array. |
cc | string | string[] | CC recipient email addresses. |
bcc | string | string[] | BCC recipient email addresses. |
headers | object | Custom email headers as key-value pairs. |
tags | array | Array of tag objects with name and value properties for tracking. |
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Email sent successfully"
}{
"error": "Validation failed",
"details": [
{
"field": "to",
"message": "Invalid email address"
}
]
}All responses include rate limit information in the headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the rate limit resets |
{
"to": ["user1@example.com", "user2@example.com"],
"subject": "Team Update",
"html": "<h1>Hello Team!</h1><p>Here's your weekly update.</p>"
}{
"to": "customer@example.com",
"subject": "Order Confirmation",
"html": "<h1>Order #12345</h1><p>Thank you for your order!</p>",
"replyTo": "orders@yourcompany.com",
"cc": ["sales@yourcompany.com"]
}{
"to": "user@example.com",
"subject": "Welcome to Our App",
"html": "<h1>Welcome!</h1>",
"tags": [
{ "name": "category", "value": "onboarding" },
{ "name": "campaign", "value": "welcome-series" }
]
}