DripEmail.org

🔌 API Integration Guide

Connect external applications to DripEmails.org

⏱️ 16 min read

REST API Overview

DripEmails.org provides a RESTful API for programmatic access to campaigns, subscribers, and analytics. Perfect for integrations, automation, and custom applications.

💡 Pro Tip: Always use API keys for authentication, never hardcode passwords. Store keys securely as environment variables.

Getting Your API Key

  1. Log into DripEmails.org
  2. Go to Settings → API Access
  3. Click "Generate New API Key"
  4. Copy the key (shown only once)
  5. Store securely - treat like a password

API Base URL

https://yourdomain.com/api/v1/

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY_HERE

Available Endpoints

Subscribers

GET /api/v1/subscribers/ - List all subscribers

POST /api/v1/subscribers/ - Add new subscriber

GET /api/v1/subscribers/{id}/ - Get subscriber details

PATCH /api/v1/subscribers/{id}/ - Update subscriber

DELETE /api/v1/subscribers/{id}/ - Delete subscriber

Campaigns

GET /api/v1/campaigns/ - List all campaigns

POST /api/v1/campaigns/ - Create campaign

GET /api/v1/campaigns/{id}/ - Get campaign details

GET /api/v1/campaigns/{id}/analytics/ - Campaign stats

Lists

GET /api/v1/lists/ - List all subscriber lists

POST /api/v1/lists/ - Create new list

GET /api/v1/lists/{id}/subscribers/ - Get list members

Example: Add Subscriber (Python)

import requests

url = "https://yourdomain.com/api/v1/subscribers/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "status": "subscribed"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())

Example: List Campaigns (JavaScript)

fetch('https://yourdomain.com/api/v1/campaigns/', {
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

⚠️ Important: API keys have full account access. Rotate them regularly and revoke immediately if compromised.

Example: Get Campaign Analytics (cURL)

curl -X GET \
  https://yourdomain.com/api/v1/campaigns/123/analytics/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response Format

All responses are JSON:

{
    "success": true,
    "data": {
        "id": 123,
        "email": "user@example.com",
        "status": "subscribed"
    },
    "message": "Subscriber added successfully"
}

Error Handling

  • 400 Bad Request: Invalid data in request
  • 401 Unauthorized: Missing or invalid API key
  • 403 Forbidden: API key lacks required permissions
  • 404 Not Found: Resource doesn't exist
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Server Error: Internal server issue

Rate Limits

API requests are limited to prevent abuse:

  • Free tier: 1,000 requests/hour
  • Pro tier: 10,000 requests/hour
  • Enterprise: Custom limits
  • Headers include rate limit info: X-RateLimit-Remaining

Pagination

List endpoints return paginated results:

GET /api/v1/subscribers/?page=2&page_size=50

Filtering and Sorting

# Filter by status
GET /api/v1/subscribers/?status=subscribed

# Search by email
GET /api/v1/subscribers/?email__contains=example.com

# Sort by date
GET /api/v1/campaigns/?ordering=-created_at

Webhooks

Receive real-time notifications for events:

  • subscriber.created: New subscriber added
  • subscriber.unsubscribed: Someone opted out
  • campaign.sent: Campaign finished sending
  • campaign.opened: Email opened
  • campaign.clicked: Link clicked

Common Integration Scenarios

Sync CRM Contacts

Automatically add new CRM contacts to email lists

E-commerce Integration

Trigger campaigns based on purchase behavior

Custom Dashboards

Pull analytics into your own reporting tools

Form Submissions

Add form leads directly to subscriber lists

Best Practices

  • Use environment variables for API keys
  • Implement exponential backoff for retries
  • Cache responses when appropriate
  • Respect rate limits and use batch endpoints
  • Handle errors gracefully
  • Use webhooks for real-time updates instead of polling
  • Log all API interactions for debugging

API Documentation

Full API reference with interactive docs available at:

Next Steps