ESP Integrations
Connect Mailchimp, Klaviyo, Constant Contact, or Campaign Monitor and push templates directly.
ESP Integrations
Templated builds the email; your email service provider (ESP) sends it. Connect an ESP via OAuth, then push finished templates straight into it.
Supported providers (use these IDs in the {provider} path segment):
| Provider | ID |
|---|---|
| Mailchimp | mailchimp |
| Klaviyo | klaviyo |
| Constant Contact | constantcontact |
| Campaign Monitor | campaignmonitor |
Connect a provider
Connection is an OAuth browser flow, not a pure API call: direct the user to
GET /api/integrations/{provider}/connect, which redirects to the provider's consent screen and returns via GET /api/integrations/{provider}/callback.
List connected integrations
curl -b cookies.txt \
https://app.templated.email/api/accounts/{slug}/integrations{
"data": [
{
"id": "b1c2d3e4-...",
"provider": "mailchimp",
"providerDisplayName": "Mailchimp",
"providerEmail": "marketing@example.com",
"status": "active",
"connectedAt": "2026-06-02T12:00:00.000Z",
"lastUsedAt": "2026-07-20T09:14:00.000Z"
}
]
}Access tokens are never returned.
Push a template to an ESP
Sends rendered HTML into the connected provider's template library. Merge tags in the HTML (like {{unsubscribe_url}}) are automatically translated to the provider's own syntax.
curl -b cookies.txt -X POST \
https://app.templated.email/api/accounts/{slug}/integrations/mailchimp/push \
-H "Content-Type: application/json" \
-d '{
"templateName": "July Newsletter",
"html": "<html><body>...</body></html>",
"plainText": "Optional plain-text version"
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
templateName | string | Yes | Name shown in the ESP, max 255 chars |
html | string | Yes | Rendered email HTML |
plainText | string | No | Plain-text alternative |
Returns 201 with the provider's result (including the created template's ID in the ESP). Requires the template:export permission.
Errors
| Status | Meaning |
|---|---|
404 | Integration not connected or inactive (code: NOT_CONNECTED) |
400 | Unknown provider ID (code: UNKNOWN_PROVIDER) |
500 | The provider rejected the push (code: PUSH_FAILED) |
Fetch merge fields
Lists the personalization merge fields available across all connected ESPs, so you can offer them while editing:
curl -b cookies.txt \
https://app.templated.email/api/accounts/{slug}/integrations/merge-fieldsReturns { "data": [ ...fields ] }. Providers that fail to respond are skipped rather than failing the request.
Disconnect a provider
curl -b cookies.txt -X DELETE \
https://app.templated.email/api/accounts/{slug}/integrations/mailchimp/disconnectNext steps
- Send yourself a test first
- Compliance footer block — uses ESP merge tags for unsubscribe links