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

Free Trial

$0

for 7 days

  • 5 emails/day
  • 1 custom domain
  • All template types
  • Full API access
Pro

$10/mo

billed monthly

  • Unlimited emails/day
  • Unlimited custom domains
  • Full analytics
  • Priority support
Start Free Trial

Quick Start

  1. 1Register at sendcrane.com/register — no credit card needed.
  2. 2Go to API Keys in your dashboard and click Generate API Key. Copy the key — it's only shown once.
  3. 3Go to Templates and create your first email template. Note the template type (e.g. transaction).
  4. 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.

POST /api/v1/email/send

Request Body

FieldTypeRequiredDescription
template_typestringYes*Template type: transaction, marketing, password_reset, notification
template_namestringYes*Exact name of the template. Required if multiple templates share the same type.
tostringYesRecipient email address
variablesobjectNoKey-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.

GET /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.

  1. 1
    Add your domain — go to Domains in your dashboard and enter your domain (e.g. mail.yourdomain.com).
  2. 2
    Add 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...
  3. 3
    Verify — click Verify in the dashboard. DNS changes can take up to 48 hours to propagate.
  4. 4
    Use it — set your template's From Email to an address on your verified domain (e.g. noreply@yourdomain.com).

Error Handling

StatusErrorMeaning
200Email sent successfully
400validation_errorMissing or invalid request parameters
401unauthenticatedAPI key missing or invalid
402subscription_requiredTrial expired — upgrade at /billing
404template_not_foundNo active template matches the type/name provided
429daily_limit_reachedDaily send limit reached (5/day on trial)
500send_failedEmail delivery failed — check template and SMTP config

Error Response Shape

{
  "success": false,
  "error": "error_code",
  "message": "Human-readable description of the error"
}

Rate Limits

PlanDaily LimitDomainsDuration
Free Trial5 emails/day1 domain7 days
Pro — $10/moUnlimitedUnlimitedMonthly renewal

Limits reset at midnight UTC. Upgrade at any time at sendcrane.com/billing.

Support