REST API Endpoints
Access the Email Template Builder programmatically:
Create Template
POST /api/templates
Content-Type: application/json
{
"name": "Welcome Email",
"subject": "Welcome to {{company}}!",
"html": "<div>...</div>",
"plain_text": "..."
}
Get Template
GET /api/templates/:id
Update Template
PUT /api/templates/:id
Delete Template
DELETE /api/templates/:id
Send Test Email
POST /api/templates/:id/test
{
"to": "test@example.com",
"variables": {
"first_name": "John",
"company": "Acme Inc"
}
}
Email Platform Integrations
Seamlessly integrate with popular email platforms:
Mailchimp Integration
POST /api/integrations/mailchimp/sync
{
"template_id": "local_id",
"mailchimp_campaign_id": "abc123"
}
SendGrid Integration
POST /api/integrations/sendgrid/sync
{
"template_id": "local_id",
"sendgrid_template_id": "d-xyz789"
}
HubSpot Integration
POST /api/integrations/hubspot/sync
{
"template_id": "local_id",
"hubspot_email_id": "456789"
}
Webhooks
Receive notifications when templates are modified:
POST /api/webhooks
{
"url": "https://your-app.com/webhook",
"events": ["template.created", "template.updated", "template.deleted"]
}
Authentication
All API requests require an API key in the header:
Authorization: Bearer YOUR_API_KEY