Email API for Developers

Simple. Fast. Secure. Send emails programmatically with a single HTTP request.

View API Contact

Lightning Fast

Millisecond response times. Enterprise-grade SMTP infrastructure. Real-time delivery.

Secure

Military-grade encryption. Timing-safe API keys. TLS/STARTTLS support.

Developer Friendly

Works with PHP, Python, Node.js, Ruby. Simple REST API. JSON responses.

Full Control

Custom sender names, CC, BCC. HTML & plain text. Complete flexibility.

Self-Hosted

Run on your servers. No vendor lock-in. Complete infrastructure control.

Scalable

Handle thousands of emails per minute. Bulk sending support. Grows with you.

API Documentation

PHP with cURL

<?php $data = [ 'to' => 'user@example.com', 'subject' => 'Hello', 'body' => '<h1>Welcome</h1>', 'from_name' => 'Your App' ]; $ch = curl_init( 'https://postbox.ezee.li/api/send' ); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json', ], ]); $response = json_decode( curl_exec($ch), true ); curl_close($ch); if ($response['success']) { echo 'Email sent!'; } ?>

Python with Requests

import requests headers = { 'Authorization': 'Bearer YOUR_API_KEY' } data = { 'to': 'user@example.com', 'subject': 'Hello', 'body': '<h1>Welcome</h1>', 'from_name': 'Your App' } response = requests.post( 'https://postbox.ezee.li/api/send', json=data, headers=headers ) result = response.json() if result['success']: print('Email sent!') else: print(f"Error: {result['error']}")

Authentication: Pass your API key as an HTTP header — Authorization: Bearer YOUR_API_KEY

Parameter Required Type Description
to Yes String Recipient email (comma-separated for multiple)
subject Yes String Email subject line
body Yes HTML Email body (HTML content)
cc No String CC recipient(s), comma-separated
bcc No String BCC recipient(s), comma-separated
text No String Plain text alternative body
from_name No String Custom sender display name

Success Response (200 OK)

{ "success": true, "message": "Email sent successfully" }

Error Response (400/401/500)

{ "success": false, "error": "Missing required fields: to, subject, body" }

HTTP Status Codes

  • 200 OK - Email sent successfully
  • 400 Bad Request - Missing or invalid parameters
  • 401 Unauthorized - Invalid API key
  • 500 Server Error - Email delivery failed

Getting Started

Get API Key

Request an API key. Store it securely and pass it as an Authorization header.

Make Request

Send a POST request with JSON body and your Bearer token to our endpoint.

Handle Response

Check JSON response for success status and error messages.

Get in Touch