Templated

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):

ProviderID
Mailchimpmailchimp
Klaviyoklaviyo
Constant Contactconstantcontact
Campaign Monitorcampaignmonitor

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

FieldTypeRequiredDescription
templateNamestringYesName shown in the ESP, max 255 chars
htmlstringYesRendered email HTML
plainTextstringNoPlain-text alternative

Returns 201 with the provider's result (including the created template's ID in the ESP). Requires the template:export permission.

Errors

StatusMeaning
404Integration not connected or inactive (code: NOT_CONNECTED)
400Unknown provider ID (code: UNKNOWN_PROVIDER)
500The 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-fields

Returns { "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/disconnect

Next steps

On this page