Piisend: A Modern Mailgun Alternative for Transactional Email APIs
Looking for a robust Mailgun alternative? Piisend offers a developer-centric transactional email API with a focus on ease of use, deliverability, and real-time event handling. Discover how Piisend streamlines your email workflows.
Section 1
Why Piisend is a Modern Mailgun Alternative for Developers
Developers often seek a transactional email API that is both powerful and straightforward to integrate. Piisend emerges as a compelling Mailgun alternative, designed from the ground up for modern applications. We prioritize a clean REST API, robust deliverability features, and a clear developer dashboard, making it easier to send critical emails like OTP verification email or password reset email.
1curl -X POST https://api.piisend.com/api/v1/emails \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "to": ["recipient@example.com"],6 "subject": "Welcome to Piisend!",7 "html": "<strong>Hello from Piisend!</strong> Your account is ready.",8 "text": "Hello from Piisend! Your account is ready."9 }'Section 2
Streamlined API for Sending Transactional Emails
Unlike some older platforms that heavily rely on SMTP, Piisend focuses on a powerful, easy-to-use HTTP API for all your transactional email needs. This approach simplifies integration into your existing codebase, whether you're using JavaScript, Python, or any other language. Our API supports rich HTML content, plain text, and even email templates merge variables for dynamic content.
1import requests2 3api_key = "YOUR_API_KEY"4url = "https://api.piisend.com/api/v1/emails"5 6headers = {7 "Authorization": f"Bearer {api_key}",8 "Content-Type": "application/json"9}10 11payload = {12 "to": ["user@example.com"],13 "subject": "Your Order Confirmation",14 "html": "<p>Thank you for your order <strong>#12345</strong>!</p>",15 "text": "Thank you for your order #12345!"16}17 18response = requests.post(url, headers=headers, json=payload)19 20print(response.status_code)21print(response.json())Section 3
Ensuring Deliverability with Verified Domains
A key aspect of any transactional email API is ensuring your emails actually reach the inbox. Piisend provides a straightforward process for domain verification, guiding you through setting up SPF, DKIM, and DMARC records. This crucial step helps establish your sender reputation and significantly improves your email deliverability, reducing the chances of emails landing in spam folders. Our developer dashboard makes managing verified domains simple.
1{2 "domain": "yourdomain.com",3 "status": "verified",4 "dns_records": [5 {6 "type": "TXT",7 "name": "yourdomain.com",8 "value": "v=spf1 include:_spf.piisend.com ~all"9 },10 {11 "type": "TXT",12 "name": "piisend._domainkey.yourdomain.com",13 "value": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD..."14 }15 ]16}Section 4
Handling Email Events: Bounces, Deliveries, and Opens via Webhooks
Understanding the lifecycle of your emails is vital. Piisend offers robust webhook delivery events, allowing you to receive real-time notifications for bounces, deliveries, opens, clicks, and more. This enables you to implement sophisticated bounce suppression and analytics within your application. Each webhook payload is signed with an X-Webhook-Signature header (HMAC-SHA256 of the raw body) and includes an X-Webhook-Timestamp for security and replay attack prevention.
1{2 "event": "delivered",3 "email_id": "email_abc123",4 "recipient": "user@example.com",5 "timestamp": 1678886400,6 "message_id": "<abc123def456@piisend.com>",7 "metadata": {8 "user_id": "789",9 "campaign": "welcome"10 }11}