Skip to content
Developers

Email Marketing

Campaigns

Creating a campaign saves a draft. Sending is a separate call, so a create request cannot mail the list by accident.

Create a draft

POST/api/v1/email/campaignscampaigns:write
nameRequired campaign name.
subjectRequired subject line.
audienceIdRequired audience to send to.
templateVersionIdPins the content. Or pass templateId and we use the latest version.
fromNameRequired sender name.
fromEmailRequired. Must already be an address on a verified sending domain.
previewTextOptional.
replyToOptional reply-to address.
curl
curl -sS https://api.thealtermeai.com/api/v1/email/campaigns \
  -H "Authorization: Bearer emk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "October launch",
    "subject": "It is ready",
    "audienceId": "YOUR_AUDIENCE_ID",
    "templateId": "YOUR_TEMPLATE_ID",
    "fromName": "Ada",
    "fromEmail": "[email protected]"
  }'

Create returns 201 and does not send. The template version must already have compiled HTML — create one with the Templates API or in the app. Use sender identities to pick a verified fromEmail. An unverified from address returns 409 with code NOT_SENDABLE.

List and update

GET/api/v1/email/campaignscampaigns:read

Newest first. Filter with status. limit defaults to 25 and caps at 200.

GET/api/v1/email/campaigns/{campaignId}campaigns:read
PATCH/api/v1/email/campaigns/{campaignId}campaigns:write

Send

POST/api/v1/email/campaigns/{campaignId}/sendcampaigns:write
curl
curl -sS -X POST https://api.thealtermeai.com/api/v1/email/campaigns/CAMPAIGN_ID/send \
  -H "Authorization: Bearer emk_YOUR_KEY"

An accepted send returns 202. Work Funds are debited per recipient, at the same rates as the app. Insufficient funds return 402. The from address has to sit on a verified sending domain.