Amazon SES API
Send transactional and marketing emails reliably using Amazon SES. Easy integration with high deliverability.
Overview
API Plugin's Amazon SES integration provides a simple way to send emails using Amazon's reliable email infrastructure. Perfect for sending transactional emails, marketing campaigns, and automated notifications.
Key benefits include:
- High deliverability rates
- Reliable email sending
- HTML and plain text support
- CC/BCC functionality
- Reply-To options
- Sending statistics
- AWS infrastructure
How to Setup
We assume you have signed up on API Plugin and are logged into the dashboard.
-
Create AWS Credentials:
- Go to AWS IAM Console
- Create a new IAM user
- Attach AmazonSESFullAccess policy
- Save Access Key ID and Secret Access Key
-
Verify Email Domain:
- Go to Amazon SES Console
- Click "Verified Identities"
- Add and verify your domain
- Follow AWS DNS verification steps
-
Configure API:
- Go to API Plugin marketplace
- Select Amazon SES
- Input AWS credentials
- Save configuration
Available Endpoints
- Send Email
POST /v1/{appId}/{token}/send
Send an email with support for HTML, plain text, CC, BCC, and reply-to addresses.
Request Body:
{
"from": "sender@yourdomain.com",
"to": ["recipient@example.com"],
"subject": "Welcome to Our Service",
"body": "Plain text version of the email",
"html": "<h1>Welcome</h1><p>HTML version of the email</p>",
"cc": ["cc@example.com"],
"bcc": ["bcc@example.com"],
"replyTo": ["support@yourdomain.com"]
}
Response:
{
"success": true,
"message_id": "0100018e-7a99-7718-9111-5c8e54c3ea19-000000"
}
- Get Statistics
GET /v1/{appId}/{token}/statistics
Get email sending statistics including delivery attempts, bounces, and complaints.
Response:
{
"SendDataPoints": [
{
"Timestamp": "2024-03-18T10:00:00Z",
"DeliveryAttempts": 100,
"Bounces": 2,
"Complaints": 0,
"Rejects": 0
}
]
}
Examples
- Simple Text Email
const response = await fetch('/v1/{appId}/{token}/send', {
method: 'POST',
body: JSON.stringify({
from: 'sender@yourdomain.com',
to: ['recipient@example.com'],
subject: 'Simple Text Email',
body: 'This is a simple text email.',
}),
});
- HTML Email with CC
const response = await fetch('/v1/{appId}/{token}/send', {
method: 'POST',
body: JSON.stringify({
from: 'sender@yourdomain.com',
to: ['recipient@example.com'],
cc: ['cc@example.com'],
subject: 'HTML Newsletter',
html: '<h1>Newsletter</h1><p>Your content here</p>',
body: 'Text version of newsletter',
}),
});