SendCrane API Docs
Send transactional and marketing emails from your app using a simple REST API.
Base URL
https://sendcrane.com/api/v1
All requests must be authenticated with an API key. Responses are JSON.
Free Trial
Trial account limits
- 5 emails per day — resets at midnight UTC
- 1 custom domain — upgrade for more
- 7 days duration — no credit card required to start
When you hit the daily limit, the API returns 429 Too Many Requests with an upgrade_url in the response body.
{
"success": false,
"error": "daily_limit_reached",
"message": "You have reached your daily limit of 5 emails on the free trial.",
"sent_today": 5,
"daily_limit": 5,
"upgrade_url": "https://sendcrane.com/billing"
}
When the trial expires, the API returns 402 Payment Required:
{
"success": false,
"error": "subscription_required",
"message": "Your free trial has expired. Please subscribe to continue sending emails.",
"upgrade_url": "https://sendcrane.com/billing"
}
Pricing
$0
for 7 days
- 5 emails/day
- 1 custom domain
- All template types
- Full API access
$10/mo
billed monthly
- Unlimited emails/day
- Unlimited custom domains
- Full analytics
- Priority support
Quick Start
- 1Register at sendcrane.com/register — no credit card needed.
- 2Go to API Keys in your dashboard and click Generate API Key. Copy the key — it's only shown once.
- 3Go to Templates and create your first email template. Note the template type (e.g.
transaction). - 4Call the Send Email API with your API key and template type.
curl -X POST https://sendcrane.com/api/v1/email/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_type": "transaction",
"to": "customer@example.com",
"variables": {
"user_name": "Jane",
"order_id": "12345"
}
}'
Authentication
All API requests require a valid API key passed as a Bearer token in the Authorization header:
Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keep your API key secret. Never expose it in frontend JavaScript, public repos, or client-side code. Regenerate it if compromised.
Send Email
Send an email using a template from your account.
/api/v1/email/send
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
template_type | string | Yes* | Template type: transaction, marketing, password_reset, notification |
template_name | string | Yes* | Exact name of the template. Required if multiple templates share the same type. |
to | string | Yes | Recipient email address |
variables | object | No | Key-value pairs to replace {{variable}} placeholders in the template |
* Provide either template_type or template_name (or both).
Example Request
curl -X POST https://sendcrane.com/api/v1/email/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_name": "order-confirmation",
"to": "customer@example.com",
"variables": {
"user_name": "John Doe",
"order_id": "ORD-9821",
"amount": "UGX 85,000"
}
}'
Success Response 200 OK
{
"success": true,
"message": "Email sent successfully"
}
List Templates
Retrieve the available email templates for your API key.
/api/v1/email/templates
Example Request
curl https://sendcrane.com/api/v1/email/templates \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{
"templates": [
{
"name": "order-confirmation",
"type": "transaction",
"subject": "Your order has been confirmed",
"is_active": true
},
{
"name": "welcome-email",
"type": "notification",
"subject": "Welcome to our platform",
"is_active": true
}
]
}
Template Variables
Templates support dynamic variable substitution using double curly brace syntax. When creating a template, use {{variable_name}} as a placeholder anywhere in the subject or HTML body.
Example Template HTML
<p>Hello {{user_name}},</p>
<p>Your order <strong>{{order_id}}</strong> has been received.</p>
<p>Total: {{amount}}</p>
Then pass those values in the variables field when sending:
"variables": {
"user_name": "Jane",
"order_id": "ORD-1234",
"amount": "UGX 45,000"
}
Custom Domain Setup
Sending from your own domain improves deliverability and brand trust. Trial accounts can add 1 domain. Pro accounts have no limit.
- 1Add your domain — go to Domains in your dashboard and enter your domain (e.g.
mail.yourdomain.com). - 2Add the DNS TXT record — copy the verification token shown and add it as a TXT record on your domain in your DNS provider (Cloudflare, GoDaddy, etc.). The record looks like:
v=xxxxxxxx... - 3Verify — click Verify in the dashboard. DNS changes can take up to 48 hours to propagate.
- 4Use it — set your template's From Email to an address on your verified domain (e.g.
noreply@yourdomain.com).
Error Handling
| Status | Error | Meaning |
|---|---|---|
| 200 | — | Email sent successfully |
| 400 | validation_error | Missing or invalid request parameters |
| 401 | unauthenticated | API key missing or invalid |
| 402 | subscription_required | Trial expired — upgrade at /billing |
| 404 | template_not_found | No active template matches the type/name provided |
| 429 | daily_limit_reached | Daily send limit reached (5/day on trial) |
| 500 | send_failed | Email delivery failed — check template and SMTP config |
Error Response Shape
{
"success": false,
"error": "error_code",
"message": "Human-readable description of the error"
}
Rate Limits
| Plan | Daily Limit | Domains | Duration |
|---|---|---|---|
| Free Trial | 5 emails/day | 1 domain | 7 days |
| Pro — $10/mo | Unlimited | Unlimited | Monthly renewal |
Limits reset at midnight UTC. Upgrade at any time at sendcrane.com/billing.