Public API Documentation

Our Public API provides a simplified interface that only exposes email sending functionality for security purposes.

Email Sending Endpoint

URL: /public-api/email/send/

Method: POST

Authentication: API Key (generated from your account)

Request Parameters

Field Type Required Description
api_key string Yes Your API key for authentication
to_email string Yes Recipient email address
from_email string Yes Sender email address (must be from a verified domain you own)
subject string Yes Email subject
message string Yes Plain text email body
html_message string No HTML email body (optional)

Example Request


curl -X POST \
  https://your-domain.com/public-api/email/send/ \
  -H 'Content-Type: application/json' \
  -d '{
    "api_key": "your_api_token_here",
    "to_email": "recipient@example.com",
    "from_email": "sender@yourdomain.com",
    "subject": "Test Email from API",
    "message": "This is a test email sent via the Public API.",
    "html_message": "<h1>Hello!</h1><p>This is a test email sent via the Public API.</p>"
}'
            

Success Response


{
  "message": "Email queued for sending",
  "task_id": "task_id_here",
  "email_details": {
    "to": "recipient@example.com",
    "from": "sender@yourdomain.com",
    "subject": "Test Email from API"
  }
}
            

Error Responses


{
  "detail": "Invalid API key or authentication failed"
}

{
  "from_email": ["You don't have a verified domain to send emails from."]
}
            

How to Get Your API Key

  1. Log in to your account
  2. Navigate to your Profile
  3. Find the "API Tokens" section
  4. Click "Generate new token"
  5. Copy and securely store your API key
Warning: Keep your API key secure. Do not share it or expose it in client-side code.

Rate Limits

The Public API has rate limits based on your account tier:

  • Free tier: 100 emails per day
  • Basic tier: 1,000 emails per day
  • Professional tier: 10,000 emails per day
  • Enterprise tier: Customizable limits

If you exceed your rate limit, you'll receive a 429 Too Many Requests response.