Senderr API Reference
Welcome to the Senderr API! Our RESTful API enables you to programmatically access your email template library, render templates with custom variables, and send emails using your purchased or created templates.
Base URL
All API requests should be made to:
https://senderr.dev/api/v1
For development and testing:
http://localhost:3000/api/v1
Authentication
Senderr API supports two authentication methods:
1. API Key Authentication (Recommended for server-side)
Include your API key in the request header:
curl -H "X-API-Key: your-api-key-here" \
https://senderr.dev/api/v1/library
Or using the Authorization header:
curl -H "Authorization: Bearer your-api-key-here" \
https://senderr.dev/api/v1/library
2. Session Authentication (Browser-based)
When making requests from a logged-in browser session, authentication is handled automatically via secure HTTP-only cookies.
Getting Your API Key
Log in to your Senderr Dashboard
Navigate to Settings → API Keys
Click “Generate New API Key”
Copy and securely store your key
API keys provide full access to your account. Keep them secure and never expose them in client-side code.
Rate Limits
API usage is limited based on your subscription plan:
Plan Monthly API Calls Email Sending Free 500 calls/month 100 emails/month Monthly Unlimited 10,000 emails/month Annual Unlimited 50,000 emails/month
Rate limit information is included in response headers:
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 450
X-RateLimit-Reset: 2024-02-01T00:00:00Z
X-RateLimit-Plan: free
Error Handling
The API uses conventional HTTP response codes and returns JSON error responses:
{
"error" : "Template not found" ,
"message" : "This template is not in your library" ,
"success" : false ,
"code" : "TEMPLATE_NOT_FOUND"
}
Common HTTP Status Codes
Code Description 200Success 400Bad Request - Invalid parameters 401Unauthorized - Invalid or missing API key 403Forbidden - Access denied (template not purchased) 404Not Found - Resource doesn’t exist 429Too Many Requests - Rate limit exceeded 500Internal Server Error
List endpoints support pagination using limit and offset parameters:
curl "https://senderr.dev/api/v1/library?limit=20&offset=40" \
-H "X-API-Key: your-api-key"
SDKs and Libraries
Official SDKs are coming soon. For now, you can use any HTTP client library in your preferred programming language.
Quick Start Examples
JavaScript/Node.js
Python
cURL
const senderr = {
apiKey: 'your-api-key' ,
baseUrl: 'https://senderr.dev/api/v1' ,
async request ( endpoint , options = {}) {
const response = await fetch ( ` ${ this . baseUrl }${ endpoint } ` , {
headers: {
'Content-Type' : 'application/json' ,
'X-API-Key' : this . apiKey ,
... options . headers
},
... options
});
return response . json ();
},
// Get your template library
async getLibrary () {
return this . request ( '/library' );
},
// Send an email
async sendEmail ( templateId , to , subject , variables ) {
return this . request ( '/send' , {
method: 'POST' ,
body: JSON . stringify ({
template_id: templateId ,
to ,
subject ,
variables
})
});
}
};
// Usage
const library = await senderr . getLibrary ();
console . log ( `You have ${ library . templates . length } templates` );
Next Steps
Support
Need help with the API? Contact our support team: