Free setup on annual plans

Sign up today!

Mailings

API Reference: Mailings endpoints

Mailings send one e-mail to a list of end users and representatives from one of your e-mail channels. You build a mailing list, write the content (optionally from a template), run a preflight that fixes the recipients, have an Administrator approve and start the campaign, and follow the result in the campaign report. Mailing preferences record who opted in or out, and every mail carries a personal unsubscribe link. Mailings must be included in the account’s subscription.

Overview

  • Who does what
    A Configurator or Administrator prepares lists, templates and campaigns, runs the preflight and sends tests. Approving, starting, scheduling, pausing, resuming and cancelling a campaign is for an Administrator. Reports can also be read by a Supervisor or Analyst.
  • Subscription
    When the account’s subscription does not include mailings, every endpoint except the unsubscribe link answers 403 with { "error": "Feature 'Mailings' is not available for the current subscription plan." }.
  • Concurrency
    Most changes send back the updatedAt value you last read. When someone else changed the object in between, the answer is 409 Conflict with the current version, so you can reload and try again.
  • Paging
    Lists take pageNumber (default 1) and pageSize (default 10, at most 200) and answer { "items": [...], "totalCount": n, "totalPages": n }.

Endpoints

Campaigns

  • GET /api/MailingCampaigns
    Access: Bearer JWT (Configurator or Administrator)
    List the campaigns, paged. Query: search (name or subject), sortBy (Name, UpdatedAt, CreatedAt, Status or Subject; default UpdatedAt) and sortOrder (asc or desc, default asc).
  • POST /api/MailingCampaigns
    Access: Bearer JWT (Configurator or Administrator)
    Create a campaign in status Draft, optionally from a template. Answers 201 Created with the campaign.
  • GET /api/MailingCampaigns/channel-options
    Access: Bearer JWT (Configurator or Administrator)
    The active e-mail channels a campaign can be sent from: channelID, name, emailAddress and providerType (Office365 or ImapSmtp).
  • GET /api/MailingCampaigns/{id}
    Access: Bearer JWT (Configurator or Administrator)
    One campaign with its content, audience counts, approval, recent events and the actions that are possible now.
  • PUT /api/MailingCampaigns/{id}
    Access: Bearer JWT (Configurator or Administrator)
    Save the name, list, channel, purpose and content of a campaign that is not sending yet. Returns the campaign.
  • DELETE /api/MailingCampaigns/{id}
    Access: Bearer JWT (Configurator or Administrator)
    Delete a campaign in status Draft. Answers 204 No Content.
  • GET /api/MailingCampaigns/{id}/preview
    Access: Bearer JWT (Configurator or Administrator)
    Render the subject and body for an example contact, an empty contact or a list member. Nothing is sent.
  • POST /api/MailingCampaigns/{id}/variants/{language}/translate
    Access: Bearer JWT (Configurator or Administrator)
    Translate the default content into the language of a saved variant with AI and return the result. Nothing is stored.
  • POST /api/MailingCampaigns/{id}/test
    Access: Bearer JWT (Configurator or Administrator)
    Send the campaign as a marked test mail to at most 5 addresses (default: your own address).
  • POST /api/MailingCampaigns/{id}/preflight
    Access: Bearer JWT (Configurator or Administrator)
    Fix the recipients: resolve the list, apply mailing preferences and the purpose, and record who will receive the mail and who is left out.
  • GET /api/MailingCampaigns/{id}/recipients
    Access: Bearer JWT (Configurator or Administrator)
    The recipients of the last preflight, paged, eligible first. Query: eligibility (Eligible or Excluded) and search.
  • GET /api/MailingCampaigns/{id}/recipients/export
    Access: Bearer JWT (Configurator or Administrator)
    The recipients of the last preflight as a CSV file.
  • POST /api/MailingCampaigns/{id}/approve
    Access: Bearer JWT (Administrator)
    Approve a preflighted campaign with its communication basis.
  • POST /api/MailingCampaigns/{id}/start
    Access: Bearer JWT (Administrator)
    Send an approved campaign now, or schedule it with scheduledAt.
  • POST /api/MailingCampaigns/{id}/unschedule
    Access: Bearer JWT (Administrator)
    Take a scheduled campaign back to Approved.
  • POST /api/MailingCampaigns/{id}/pause
    Access: Bearer JWT (Administrator)
    Pause a campaign that is sending. A mail that is already on its way completes.
  • POST /api/MailingCampaigns/{id}/resume
    Access: Bearer JWT (Administrator)
    Resume a paused campaign; the next round starts at once.
  • POST /api/MailingCampaigns/{id}/cancel
    Access: Bearer JWT (Administrator)
    Cancel a campaign that is approved, scheduled, queued, sending or paused. Recipients that are still waiting are not sent.
  • POST /api/MailingCampaigns/{id}/recipients/{recipientId}/reconcile
    Access: Bearer JWT (Administrator)
    Settle a recipient whose sending is uncertain, after you checked the sent items of the mailbox.

Campaign reports

  • GET /api/MailingCampaigns/reports
    Access: Bearer JWT (Supervisor, Configurator, Administrator or Analyst)
    Every campaign of the account, most recently changed first, paged. Query: search (name or subject).
  • GET /api/MailingCampaigns/{id}/report
    Access: Bearer JWT (Supervisor, Configurator, Administrator or Analyst)
    The report of one campaign: counts, events, results per language and the clicked links.
  • GET /api/MailingCampaigns/{id}/report/recipients
    Access: Bearer JWT (Configurator or Administrator)
    The recipients with their delivery result, paged. Query: deliveryStatus, search, unsubscribed and clicked.
  • GET /api/MailingCampaigns/{id}/report/recipients/export
    Access: Bearer JWT (Configurator or Administrator)
    The same recipients as a CSV file, with the same filters.

Mailing lists

  • GET /api/MailingLists
    Access: Bearer JWT (Configurator or Administrator)
    List the mailing lists, paged. Query: search (name or description), includeArchived (default false), sortBy (Name, CreatedAt, UpdatedAt, MemberCount or Status; default Name) and sortOrder.
  • POST /api/MailingLists
    Access: Bearer JWT (Configurator or Administrator)
    Create a list. Answers 201 Created with the list.
  • GET /api/MailingLists/lookup
    Access: Bearer JWT (Configurator or Administrator)
    The active lists as mailingListID and name, by name, for a picker.
  • GET /api/MailingLists/customer-rep-candidates
    Access: Bearer JWT (Configurator or Administrator)
    Active representatives that can be added to a list (at most 200). Query: search (name or e-mail address).
  • GET /api/MailingLists/{id}
    Access: Bearer JWT (Configurator or Administrator)
    One list with its counts, rule, exceptions and its last 10 imports.
  • PUT /api/MailingLists/{id}
    Access: Bearer JWT (Configurator or Administrator)
    Change the name, description or status (Active or Archived) of a list.
  • DELETE /api/MailingLists/{id}
    Access: Bearer JWT (Configurator or Administrator)
    Delete a list that no campaign uses. Answers 204 No Content.
  • GET /api/MailingLists/{id}/members
    Access: Bearer JWT (Configurator or Administrator)
    The members you added to the list, paged.
  • POST /api/MailingLists/{id}/members/end-users
    Access: Bearer JWT (Configurator or Administrator)
    Add end users to the list (1 to 500 per request).
  • POST /api/MailingLists/{id}/members/customer-reps
    Access: Bearer JWT (Configurator or Administrator)
    Add representatives to the list (1 to 500 per request).
  • DELETE /api/MailingLists/{id}/members/{memberId}
    Access: Bearer JWT (Configurator or Administrator)
    Remove a member from the list. Answers 204 No Content.
  • PUT /api/MailingLists/{id}/members/{memberId}/email
    Access: Bearer JWT (Configurator or Administrator)
    Choose which e-mail address of an end user member receives the mailing.
  • GET /api/MailingLists/{id}/preview
    Access: Bearer JWT (Configurator or Administrator)
    The addresses the list resolves to now, from members and rule together. Query: source (all, members or rule).
  • PUT /api/MailingLists/{id}/rule
    Access: Bearer JWT (Configurator or Administrator)
    Set the rule that adds matching end users to the list automatically.
  • DELETE /api/MailingLists/{id}/rule
    Access: Bearer JWT (Configurator or Administrator)
    Remove the rule.
  • POST /api/MailingLists/{id}/rule/preview
    Access: Bearer JWT (Configurator or Administrator)
    Count what a rule would match, without saving it.
  • POST /api/MailingLists/{id}/exclusions
    Access: Bearer JWT (Configurator or Administrator)
    Add an exception: an end user or representative who never receives mailings of this list.
  • DELETE /api/MailingLists/{id}/exclusions/{exclusionId}
    Access: Bearer JWT (Configurator or Administrator)
    Remove an exception. Answers 204 No Content.
  • POST /api/MailingLists/{id}/import/preview
    Access: Bearer JWT (Configurator or Administrator)
    Analyse a CSV file of contacts and show what an import would do. Nothing is stored.
  • POST /api/MailingLists/{id}/import
    Access: Bearer JWT (Configurator or Administrator)
    Import the contacts of a CSV file into the list.

Templates

  • GET /api/MailingTemplates
    Access: Bearer JWT (Configurator or Administrator)
    List the templates by name, paged. Query: search (name or subject).
  • POST /api/MailingTemplates
    Access: Bearer JWT (Configurator or Administrator)
    Create a template. Answers 201 Created with the template.
  • GET /api/MailingTemplates/lookup
    Access: Bearer JWT (Configurator or Administrator)
    All templates with their languages, for a picker.
  • GET /api/MailingTemplates/{id}
    Access: Bearer JWT (Configurator or Administrator)
    One template with its content and language variants.
  • PUT /api/MailingTemplates/{id}
    Access: Bearer JWT (Configurator or Administrator)
    Replace a template. Returns the template.
  • DELETE /api/MailingTemplates/{id}
    Access: Bearer JWT (Configurator or Administrator)
    Delete a template. Campaigns made from it keep their own copy. Answers 204 No Content.

Mailing preferences

  • GET /api/EmailMailingPreferences
    Access: Bearer JWT (Configurator or Administrator)
    List the recorded preferences, newest change first, paged. Query: search (part of the address) and status (OptedIn, OptedOut or Unknown).
  • GET /api/EmailMailingPreferences/lookup
    Access: Bearer JWT (Configurator or Administrator)
    The preferences of up to 500 addresses at once: repeat email in the query.
  • POST /api/EmailMailingPreferences/set
    Access: Bearer JWT (Configurator or Administrator)
    Record an opt-in or opt-out for an address, with a reason.

Unsubscribe link

  • GET /api/mailings/unsubscribe/{token}
    Access: Tokenized link (no bearer token)
    The page behind the unsubscribe link in a mailing: a confirmation with an Unsubscribe button. Returns HTML; nothing changes yet.
  • POST /api/mailings/unsubscribe/{token}
    Access: Tokenized link (no bearer token)
    Unsubscribe the address of the link. Also the target of the one-click unsubscribe of mail clients. Returns an HTML confirmation.
  • POST /api/mailings/unsubscribe/{token}/address
    Access: Tokenized link (no bearer token)
    Unsubscribe through an old link whose address is no longer stored: the form field email gives the address. Returns an HTML confirmation.

Campaigns

Campaign (response)

Summary (lists)

  • mailingCampaignID (integer)
  • name, subject (string)
  • status (string)
    See “Campaign status” below.
  • purpose (string)
    ProductUpdate or Marketing.
  • mailingListID, mailingListName, channelID, channelName, fromAddress
    The list and the e-mail channel the campaign is sent from.
  • contentRevision, audienceRevision (integer)
    Raised by every change of the content or of the list and purpose.
  • createdByCustomerRepID, createdAt, updatedByCustomerRepID, updatedAt
    Send updatedAt back unchanged with the next change.

Detail (one campaign)

  • The summary fields.
  • htmlBody, textBody (string)
    An empty textBody means the plain-text part is made from the HTML.
  • defaultLanguage (string or null) and variants (array of language, subject, htmlBody, textBody)
    Content per language; see “Languages” below.
  • trackLinks (boolean)
    Count clicks on links in the mail.
  • isEditable and canPreflight, canApprove, canStart, canSchedule, canUnschedule, canPause, canResume, canCancel (boolean)
    Which actions fit the current status. They are hints: the endpoint itself decides.
  • preflightedAt, approvedAt, scheduledAt, pausedAt, startedAt, completedAt (date-time or null), each with the representative who did it, plus stopReason and recipientsPrunedAt
  • audience (object or null)
    The last preflight: preflightedAt, the revisions it was made for, isCurrent (false when the content, the list or its members changed since), counts and languages (recipients per language).
  • approval (object or null)
    communicationBasis, motivation, eligibleRecipientCount, approvedByCustomerRepID, approvedAt and the revisions that were approved.
  • events (array)
    Recent events, newest first: eventType, actorCustomerRepID, occurredAt, details.

Counts

counts holds total, eligible and excluded; the reasons noUsableEmail, emailChoiceRequired, customerRepInactive, optedOut, notOptedIn, bounced, excludedByException; fromMembers and fromRuleOnly; the delivery states pending, claimed, accepted, permanentFailure, sendUncertain, suppressed, cancelled; and unsubscribed, clicked, clicks, clickRate with the tracked and untracked send counts.

Creating and saving

Create (body)

  • name (string, required, max 200)
  • mailingListID (integer, required)
    An active list of the account.
  • channelID (integer, required)
    An active e-mail channel of the account.
  • subject (string, max 500)
  • purpose (string)
    ProductUpdate (default) or Marketing.
  • mailingTemplateID (integer)
    Copy subject (unless you give one), content, default language and variants from this template.

Save (PUT body)

  • name (string, required, max 200), mailingListID, channelID (integer)
  • purpose (string, required)
    Exactly ProductUpdate or Marketing.
  • subject (max 500), htmlBody, textBody (string, each at most 524,288 characters)
    Replaced: a field you leave out becomes empty.
  • defaultLanguage (string, max 20) and variants (array, at most 10)
    When both are null, the languages stay as they are. A given variants array is the full set: languages you leave out are removed.
  • trackLinks (boolean or null)
    Null keeps the current value.
  • updatedAt (date-time, required)
    The value you last read.

A campaign can be saved in status Draft, Preflighted, Approved or Scheduled. A change of the content, list, channel or purpose takes a preflighted, approved or scheduled campaign back to Draft: the approval and the schedule are dropped. Renaming alone changes nothing else.

Content rules

  • Variables
    {{name}}, {{first_name}}, {{last_name}}, {{company}} and {{unsubscribe_url}}, with an optional fallback such as {{first_name|there}}. An unknown or malformed variable, {{unsubscribe_url}} in the subject, or a subject made only of variables without fallback gives 400.
  • HTML
    The HTML is cleaned when it is saved: scripts, styles, forms and frames are removed with their content, unsafe attributes and links are dropped. Common layout tags (paragraphs, headings, lists, tables, links, images, inline styles) stay.
  • Unsubscribe footer
    When the body has no visible {{unsubscribe_url}} link, a standard unsubscribe footer is added to every mail.
  • Languages
    A variant needs a default language and has its own subject and body; at most 10 variants. Language codes are accepted as nl, nl-BE, nld and similar, and stored as two letters. Each recipient gets the variant of their language, else the default content.
POST /api/MailingCampaigns
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "December product update",
  "mailingListID": 42,
  "channelID": 7,
  "subject": "What's new in December",
  "purpose": "ProductUpdate",
  "mailingTemplateID": 3
}
201 Created
Location: /api/MailingCampaigns/118

{
  "mailingCampaignID": 118,
  "name": "December product update",
  "subject": "What's new in December",
  "status": "Draft",
  "purpose": "ProductUpdate",
  "mailingListID": 42,
  "mailingListName": "Customers BE",
  "channelID": 7,
  "channelName": "Support mailbox",
  "fromAddress": "support@example.com",
  "contentRevision": 1,
  "audienceRevision": 1,
  "htmlBody": "<p>Dear {{name|customer}},</p>...",
  "textBody": "",
  "defaultLanguage": "en",
  "variants": [ { "language": "nl", "subject": "Nieuw in december", "htmlBody": "...", "textBody": "" } ],
  "trackLinks": true,
  "isEditable": true,
  "audience": null,
  "approval": null,
  "events": [],
  "canPreflight": true,
  "canApprove": false,
  "canStart": false,
  "updatedAt": "2026-12-01T09:12:44.1234567+00:00",
  ...
}
PUT /api/MailingCampaigns/118
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "December product update",
  "mailingListID": 42,
  "channelID": 7,
  "purpose": "ProductUpdate",
  "subject": "What's new in December",
  "htmlBody": "<p>Hello {{first_name|there}},</p><p>...</p><p><a href=\"{{unsubscribe_url}}\">Unsubscribe</a></p>",
  "textBody": "",
  "defaultLanguage": "en",
  "variants": [ { "language": "nl", "subject": "Nieuw in december", "htmlBody": "<p>Hallo {{first_name|daar}},</p>" } ],
  "trackLinks": true,
  "updatedAt": "2026-12-01T09:12:44.1234567+00:00"
}

200 OK  (the campaign)
GET /api/MailingCampaigns/118/preview?sample=Example&language=nl
Authorization: Bearer <token>

200 OK
{
  "subject": "Nieuw in december",
  "fromAddress": "support@example.com",
  "channelName": "Support mailbox",
  "htmlBody": "<p>Hallo Alex,</p>...",
  "textBody": "Hallo Alex, ...",
  "unsubscribeFooterAppended": false,
  "usesPersonalization": true,
  "sampleKind": "Example",
  "sampleLabel": "Alex Johnson, Example Ltd",
  "language": "nl",
  "isDefaultContent": false,
  "sampleLanguage": null
}

Preview, translation and test mails

  • Preview
    Query sample: Example (default, a made-up contact), Empty (no personal data, so fallbacks show) or Member with mailingListMemberId (a member of the campaign’s list). language: Default or a language that has a variant. The unsubscribe link points to a placeholder in the preview.
  • Translate
    Translates the saved default subject and content into an existing variant language with the account’s translation model and returns language, subject, htmlBody and textBody. Save the result yourself with PUT. The campaign must be editable, the variant saved, and the account needs an OpenAI key. One translation per campaign and language per 10 seconds; refusals and a failed translation answer 400 with an error message.
  • Test mail
    Body (all optional): addresses (at most 5 different addresses; empty: your own address), nameSource (Stored, Example or None: where the personal data comes from) and language. The subject starts with [TEST], the mail shows a test banner and its unsubscribe link does nothing. Opted-out addresses are skipped. One test per campaign per 30 seconds. The answer lists per address its outcome (Accepted, Rejected, Uncertain, NotStarted, OptedOut or Invalid) and gives acceptedCount.

Preflight, approval and sending

Campaign status

  • Draft
    New or changed. Can be saved, previewed, tested, preflighted and deleted.
  • Preflighted
    The recipients are fixed. Can be approved, or preflighted again.
  • Approved
    Can be started now or scheduled. A preflight after a list change withdraws the approval.
  • Scheduled
    Starts by itself at scheduledAt; start with a new time moves it, unschedule returns it to Approved. A start that is refused at the moment itself, or missed by more than 24 hours, also returns it to Approved.
  • Queued, Sending
    Mails go out in rounds of at most 50, about one minute apart. Can be paused or cancelled.
  • Paused
    Can be resumed or cancelled.
  • Completed
    Every recipient has a final result.
  • Cancelled
    Waiting recipients were not sent.
  • Failed
    Sending stopped by itself because at least 20% of the results (after at least 5) failed or were uncertain.

Preflight and recipients

POST .../preflight takes no body. It resolves the list (members, rule and exceptions), checks every address against the mailing preferences and the purpose, creates the unsubscribe links and replaces any earlier preflight. It needs a subject and content, an active list and channel, and at most 2,000 contacts on the list. The campaign becomes Preflighted.

  • Purpose
    An opted-out address is never sent. A Marketing campaign is only sent to addresses with an opt-in (OptedIn); a ProductUpdate campaign goes to every address without an opt-out.
  • Recipient
    mailingCampaignRecipientID, normalizedEmail, displayName, company, personName, language, variant, primaryContactType (EndUser or CustomerRep), eligibilityStatus (Eligible or Excluded), exclusionReason, deliveryStatus, the last reply or bounce (lastInboundKind: Reply, Autoresponder or Bounce), attemptCount, updatedAt and sources (the list members behind the address).
  • exclusionReason
    NoUsableEmail, EmailChoiceRequired, CustomerRepInactive, OptedOut, NotOptedIn, Bounced or ExcludedFromList.
  • deliveryStatus
    Excluded, Pending, Claimed, Accepted (accepted by the mail provider), RetryableFailure, PermanentFailure, SendUncertain, Suppressed (opted out after the preflight) or Cancelled.
  • CSV export
    campaign-{id}-preflight.csv, UTF-8 with BOM, columns email, display_name, company, language, primary_contact_type, origin, eligibility, exclusion_reason, delivery_status, last_inbound, source_count, sources.

Approve, start and stop

  • Approve (body)
    communicationBasis (required): Consent, Contract, LegitimateInterest or LegalObligation; a Marketing campaign needs Consent. motivation (optional, max 1,000): your note. updatedAt (required). The preflight must be current and have at least one recipient waiting.
  • Start (body)
    updatedAt and, to schedule, scheduledAt: at least 5 minutes and at most 30 days ahead. Without scheduledAt the campaign is queued at once. A campaign can have at most 200 recipients waiting; more gives 400.
  • Unschedule (body)
    updatedAt.
  • Pause, resume
    No body.
  • Cancel (body)
    updatedAt and an optional reason (max 400). A draft cannot be cancelled; delete it instead.
  • Reconcile (body)
    For a recipient in SendUncertain: decision (ConfirmedSent or ConfirmedNotSent), motivation (required, max 880) and the recipient’s updatedAt. ConfirmedSent marks the mail as accepted; ConfirmedNotSent puts the recipient back in line (at most 3 attempts in total), also on a completed or failed campaign, which then sends again.

Each of these answers 200 with the campaign. A request that does not fit the status, or carries an old updatedAt, answers 409 with { "error": "...", "current": { ...campaign... } }.

POST /api/MailingCampaigns/118/preflight
Authorization: Bearer <token>

200 OK
{
  "mailingCampaignID": 118,
  "status": "Preflighted",
  "audience": {
    "preflightedAt": "2026-12-01T09:30:02+00:00",
    "isCurrent": true,
    "counts": { "total": 150, "eligible": 142, "excluded": 8, "optedOut": 5, "noUsableEmail": 3, "pending": 142, ... },
    "languages": [ { "language": "en", "variant": null, "count": 97 }, { "language": "nl", "variant": "nl", "count": 45 } ]
  },
  "canApprove": true,
  "updatedAt": "2026-12-01T09:30:02.5550000+00:00",
  ...
}
POST /api/MailingCampaigns/118/approve
Authorization: Bearer <token>
Content-Type: application/json

{
  "communicationBasis": "LegitimateInterest",
  "motivation": "Existing customers, product information",
  "updatedAt": "2026-12-01T09:30:02.5550000+00:00"
}

200 OK  (the campaign, status "Approved", with "approval")
POST /api/MailingCampaigns/118/start
Authorization: Bearer <token>
Content-Type: application/json

{
  "updatedAt": "2026-12-01T09:31:10.0000000+00:00",
  "scheduledAt": "2026-12-02T08:00:00+01:00"
}

200 OK  (the campaign, status "Scheduled")
409 Conflict
{
  "error": "The campaign was changed by someone else. Reload and try again.",
  "current": { "mailingCampaignID": 118, "status": "Approved", "updatedAt": "2026-12-01T09:35:40.1000000+00:00", ... }
}
POST /api/MailingCampaigns/118/test
Authorization: Bearer <token>
Content-Type: application/json

{
  "addresses": ["reviewer@example.com"],
  "nameSource": "Example",
  "language": "nl"
}

200 OK
{
  "results": [
    { "address": "reviewer@example.com", "outcome": "Accepted", "error": null, "providerMessageId": "<id@example.com>", "nameUsed": "Alex Johnson", "languageUsed": "nl" }
  ],
  "acceptedCount": 1
}

Campaign reports

Report

  • mailingCampaignID, name, subject, status, purpose, mailingListName, channelName, fromAddress, communicationBasis, stopReason
  • createdAt, updatedAt, preflightedAt, approvedAt, startedAt, completedAt
  • counts
    As on the campaign. accepted means accepted by the mail provider, not read. Clicks count likely-human clicks on tracked links; clickRate is clicked divided by the tracked sends.
  • variants
    The same counts per language.
  • links
    Per tracked link: destinationUrl, clicks, uniqueClickers.
  • events, revisionsMatchPreflight, defaultLanguage
  • recipientsPrunedAt
    Recipient details are removed 180 days after a campaign ends; the counts stay, the recipient list and links are then empty.

Recipients of the report

Per recipient: normalizedEmail, displayName, company, primaryContactType, origin, eligibilityStatus, exclusionReason, deliveryStatus, attemptCount, lastAttemptAt, lastAttemptOutcome, lastErrorCategory, the last reply or bounce, unsubscribedAt, clickCount, lastClickAt, createdAt and updatedAt. The filter deliveryStatus takes one of the delivery states exactly; another value gives 400. The CSV export (campaign-{id}-report.csv, UTF-8 with BOM) has the same columns in snake case. It is streamed: check that the download completed.

GET /api/MailingCampaigns/118/report
Authorization: Bearer <token>

200 OK
{
  "mailingCampaignID": 118,
  "name": "December product update",
  "status": "Completed",
  "purpose": "ProductUpdate",
  "communicationBasis": "LegitimateInterest",
  "startedAt": "2026-12-02T07:00:03+00:00",
  "completedAt": "2026-12-02T07:04:41+00:00",
  "counts": { "total": 150, "eligible": 142, "accepted": 140, "permanentFailure": 2, "unsubscribed": 3, "clicked": 37, "clicks": 52, "clickRate": 0.2643, ... },
  "variants": [ { "language": "en", "recipients": 97, "accepted": 96, ... }, { "language": "nl", "recipients": 45, "accepted": 44, ... } ],
  "links": [ { "destinationUrl": "https://www.example.com/news", "clicks": 41, "uniqueClickers": 30 } ],
  "recipientsPrunedAt": null,
  ...
}
GET /api/MailingCampaigns/118/report/recipients?deliveryStatus=PermanentFailure&pageSize=50
Authorization: Bearer <token>

200 OK
{
  "items": [
    { "mailingCampaignRecipientID": 90211, "normalizedEmail": "old.address@example.com", "deliveryStatus": "PermanentFailure", "attemptCount": 1, "lastAttemptOutcome": "PermanentFailure", "lastErrorCategory": "Rejected", "clickCount": 0, ... }
  ],
  "totalCount": 2,
  "totalPages": 1
}

Mailing lists

List and members

List

  • name (string, required, max 200), description (string, max 1,000)
  • status
    Active or Archived, on PUT with updatedAt. An archived list is hidden from pickers and campaigns and takes no rule, exception or import.
  • Response
    mailingListID, memberCount (members you added), createdAt, updatedAt and the representatives; the detail adds counts (totalMembers, eligibleRecipients, duplicates, noUsableEmail, emailChoiceRequired, customerRepInactive, optedOut, ruleContacts, excludedByException, ruleOverCap), rule, ruleUpdatedAt, exclusions, the last 10 imports and scheduledCampaigns.
  • A list holds at most 2,000 contacts, members and rule matches together. A list that a campaign uses cannot be deleted (409); archive it.

Members

  • Add (body)
    { "endUserIDs": [...] } or { "customerRepIDs": [...] }, 1 to 500 IDs. Representatives must be active. The answer gives added, alreadyMembers, notFound and addedMailingListMemberIDs.
  • Member
    mailingListMemberID, contactType (EndUser or CustomerRep), endUserID or customerRepID, displayName, company, emailAddress, availableEmails and preferredEndUserUIDID, matchesRule, othersOnAddress, eligibility and duplicateOfMailingListMemberID.
  • eligibility
    Eligible, NoUsableEmail, EmailChoiceRequired (the end user has several addresses and none is primary), CustomerRepInactive, Duplicate, OptedOut, NotOptedIn or ExcludedFromList.
  • Choose an address
    PUT .../members/{memberId}/email with { "endUserUIDID": 20411 }: one of the end user’s e-mail identifiers; null goes back to the default (the primary address).
  • Exception (body)
    { "endUserID": 5012 } or { "customerRepID": 15 }, exactly one. The contact stays out of every campaign of this list, also when a rule matches.

Rule

A rule adds every end user of the account that matches all its conditions. It never adds representatives. Body of PUT .../rule and POST .../rule/preview: conditions (1 to 10), and on PUT optionally checkRuleStamp with expectedRuleUpdatedAt (null: no rule yet) to refuse the change with 409 and code RuleChanged when someone else changed the rule. DELETE .../rule takes the same two values in the query.

  • field
    Language, CustomerType (Lead, Customer or Partner), Company, Country, City, PostalCode, CustomerRef, or CustomFields.<FieldName> for an end-user custom field.
  • operator
    IsOneOf, IsNotOneOf, Contains, StartsWith, IsEmpty, IsNotEmpty, IsAtLeast, IsAtMost. Language and CustomerType take only IsOneOf and IsNotOneOf; IsAtLeast and IsAtMost only fit number and date fields, with one value.
  • values
    At most 20 values of at most 200 characters; dates as yyyy-MM-dd; none for IsEmpty and IsNotEmpty. Text comparisons ignore case.
  • The preview answers matches, withEmail, alreadyMembers, excluded, totalContacts and maxMembers.

CSV import

Send multipart/form-data with file (the CSV) and optionally emailColumn, firstNameColumn, lastNameColumn, companyColumn, languageColumn (header names), addExisting (default true: add end users that already exist) and updateExisting (default false: overwrite their name, company and language with the non-empty values of the file).

  • File
    UTF-8 (with or without BOM), separator comma, semicolon or tab (detected), at most 2 MB, 5,000 rows and 50 columns.
  • Columns
    Without column names in the request, common headers are recognised in English, Dutch, French and German (for example email, e-mailadres, voornaam, company, taal). When no e-mail column is found, the preview returns the headers so you can choose one.
  • Rows
    Each row becomes New, Existing, AlreadyMember, ExistingSkipped, Invalid, Duplicate or OverCapacity. A new address becomes a new end user. Opted-out addresses are imported but left out by the preflight.
  • Answer
    The preview gives headers, the mapping used, counts and the rows. The import analyses the file again, adds the contacts in one go and returns mailingListImportID, counts, existingUpdated, skippedRows and the list. One import per account runs at a time; a second one answers 409.
POST /api/MailingLists
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Customers BE",
  "description": "Active Belgian customers"
}

201 Created
{
  "mailingListID": 42,
  "name": "Customers BE",
  "description": "Active Belgian customers",
  "status": "Active",
  "memberCount": 0,
  "counts": { "totalMembers": 0, "eligibleRecipients": 0, "ruleContacts": 0, "ruleOverCap": false, ... },
  "rule": null,
  "exclusions": [],
  "imports": [],
  "scheduledCampaigns": 0,
  "updatedAt": "2026-12-01T08:00:00.0000000+00:00",
  ...
}
POST /api/MailingLists/42/members/end-users
Authorization: Bearer <token>
Content-Type: application/json

{
  "endUserIDs": [5012, 5013, 999999]
}

200 OK
{
  "added": 2,
  "alreadyMembers": 0,
  "notFound": 1,
  "addedMailingListMemberIDs": [871, 872]
}
PUT /api/MailingLists/42/rule
Authorization: Bearer <token>
Content-Type: application/json

{
  "conditions": [
    { "field": "Country", "operator": "IsOneOf", "values": ["BE"] },
    { "field": "CustomerType", "operator": "IsOneOf", "values": ["Customer"] }
  ],
  "checkRuleStamp": true,
  "expectedRuleUpdatedAt": null
}

200 OK  (the list, with "rule" and "ruleUpdatedAt")
POST /api/MailingLists/42/import/preview
Authorization: Bearer <token>
Content-Type: multipart/form-data; boundary=----b

------b
Content-Disposition: form-data; name="file"; filename="contacts.csv"
Content-Type: text/csv

email;first name;last name;company
jamie@example.com;Jamie;Peeters;Example BV
------b--

200 OK
{
  "fileName": "contacts.csv",
  "separator": ";",
  "headers": ["email", "first name", "last name", "company"],
  "mapping": { "emailColumn": "email", "firstNameColumn": "first name", "lastNameColumn": "last name", "companyColumn": "company", "languageColumn": null, "addExisting": true, "updateExisting": false },
  "counts": { "rows": 1, "new": 1, "existing": 0, "invalid": 0, "duplicates": 0, "toImport": 1, ... },
  "rows": [ { "row": 2, "email": "jamie@example.com", "firstName": "Jamie", "lastName": "Peeters", "company": "Example BV", "outcome": "New", ... } ],
  "maxMembers": 2000,
  "currentMembers": 2
}

Templates

Template (body)

  • name (string, required, max 200)
  • subject (max 500), htmlBody, textBody (each at most 524,288 characters)
  • defaultLanguage (max 20) and variants (at most 10, each with language, subject, htmlBody, textBody)
  • updatedAt
    Required on PUT. On DELETE it is an optional query value; with it, a changed template is not deleted (409).

The content rules of campaigns apply. A PUT replaces the whole template: fields you leave out are cleared. The response adds mailingTemplateID, variantLanguages, createdAt, updatedAt and the representatives.

POST /api/MailingTemplates
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Monthly update",
  "subject": "News from {{company|us}}",
  "htmlBody": "<p>Hello {{first_name|there}},</p><p><a href=\"{{unsubscribe_url}}\">Unsubscribe</a></p>",
  "textBody": "",
  "defaultLanguage": "en",
  "variants": [ { "language": "nl-BE", "subject": "Nieuws", "htmlBody": "<p>Hallo {{first_name|daar}},</p>" } ]
}
201 Created
Location: /api/MailingTemplates/3

{
  "mailingTemplateID": 3,
  "name": "Monthly update",
  "subject": "News from {{company|us}}",
  "defaultLanguage": "en",
  "variantLanguages": ["nl"],
  "htmlBody": "<p>Hello {{first_name|there}},</p>...",
  "textBody": "",
  "variants": [ { "language": "nl", "subject": "Nieuws", "htmlBody": "<p>Hallo {{first_name|daar}},</p>", "textBody": "" } ],
  "createdByCustomerRepID": 15,
  "createdAt": "2026-12-01T08:10:00.0000000+00:00",
  "updatedByCustomerRepID": 15,
  "updatedAt": "2026-12-01T08:10:00.0000000+00:00"
}

Mailing preferences and unsubscribing

Preference

  • normalizedEmail, status (OptedIn or OptedOut; an address without a record is Unknown)
  • source
    PublicUnsubscribe (the unsubscribe link), Admin (set through the API or the app), Import or ProviderBounce.
  • capturedAt, revokedAt, auditReference (the reason), updatedByCustomerRepID, updatedAt

A preference holds for the whole account and every campaign. The newest decision counts; an older decision never replaces a newer one.

Set (body)

  • email (string, required, max 320)
  • status (required)
    OptedIn or OptedOut.
  • reason (string, required, max 200)

An opt-out also stops waiting mails to that address in running campaigns. The lookup returns { "preferences": { "<address>": { ... } } }; addresses without a record are left out, invalid addresses are ignored.

Unsubscribe link

  • Every recipient of a campaign gets a personal link https://api.answerpal.eu/api/mailings/unsubscribe/{token}; {{unsubscribe_url}} in the content becomes this link. Mails sent through an SMTP channel also carry the one-click unsubscribe headers that mail clients show as an Unsubscribe button.
  • The GET page only asks for confirmation. The POST records an opt-out for the address of the link (source PublicUnsubscribe) and stops waiting mails to it. The answer is the same confirmation page for every token, also an unknown or already used one.
  • After about two years the address is removed from the link. Such a link then shows a form that asks for the address (POST .../address, field email); a one-click request on it answers 410.
  • Limits per IP address: 600 page views and 60 unsubscribe requests per minute, then 429 with Retry-After. One link can unsubscribe at most 10 times per 15 minutes.
POST /api/EmailMailingPreferences/set
Authorization: Bearer <token>
Content-Type: application/json

{
  "email": "Jamie@Example.com",
  "status": "OptedOut",
  "reason": "Asked by phone on 1 December"
}

200 OK
{
  "emailMailingPreferenceID": 7781,
  "normalizedEmail": "jamie@example.com",
  "status": "OptedOut",
  "source": "Admin",
  "capturedAt": "2026-12-01T10:02:11+00:00",
  "revokedAt": "2026-12-01T10:02:11+00:00",
  "auditReference": "Asked by phone on 1 December",
  "updatedByCustomerRepID": 15,
  "updatedAt": "2026-12-01T10:02:11+00:00"
}
GET /api/EmailMailingPreferences/lookup?email=jamie%40example.com&email=sam%40example.com
Authorization: Bearer <token>

200 OK
{
  "preferences": {
    "jamie@example.com": { "status": "OptedOut", "source": "Admin", ... }
  }
}
POST /api/mailings/unsubscribe/q3Vb2kR8x0Lm9TnP4sYw7cHd1JfGa6EeZu5Oi_-KXyQ
Content-Type: application/x-www-form-urlencoded

List-Unsubscribe=One-Click

200 OK
Content-Type: text/html; charset=utf-8

<html> ... Unsubscribed ... </html>

Access and status codes

Mailings must be included in the account’s subscription. Lists, templates, campaigns and preferences are for a Configurator or Administrator; approving, starting, scheduling, pausing, resuming, cancelling and reconciling are for an Administrator; the report list and a campaign’s report can also be read by a Supervisor or Analyst. The unsubscribe link needs no token. The access line of each endpoint above is the reference.

  • 200 OK, 201 Created, 204 No Content
    Success.
  • 400 Bad Request
    Invalid input as validation details (errors per field), or a refusal as { "error": "..." }: an unknown variable, an inactive list or channel, a full list, a schedule outside the window, more than 200 recipients, a CSV problem. A test mail or translation asked too soon also answers 400.
  • 401 Unauthorized, 403 Forbidden
    No valid token, a role that may not do this, or mailings not in the subscription ({ "error": "Feature 'Mailings' is not available for the current subscription plan." }).
  • 404 Not Found
    No campaign, list, member, template or recipient with that ID for this account.
  • 409 Conflict
    The status does not allow it, updatedAt is old, the list is archived or in use, or another import runs. Campaigns, lists and preferences add the current version (current), templates add template.
  • 410 Gone, 429 Too Many Requests
    Only on the unsubscribe link, see above.
  • 500 Internal Server Error
    An unexpected error, with a traceId.

FAQ

A Marketing campaign only goes to addresses with an opt-in. Record the opt-in with POST /api/EmailMailingPreferences/set (OptedIn and a reason) and run the preflight again. A ProductUpdate campaign goes to every address without an opt-out.

The approval no longer matches the recipients: audience.isCurrent becomes false and start answers 409. Run the preflight again and approve the campaign again.

A campaign starts with at most 200 recipients waiting. Split the audience over several lists and campaigns.

The mail provider did not confirm whether the mail was accepted. AnswerPal does not retry it by itself, to avoid a double mail. Check the sent items of the mailbox and settle it with POST /api/MailingCampaigns/{id}/recipients/{recipientId}/reconcile.

Need more help?

Table of Contents

AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.

Contact

For all support, sales, and partnership inquiries, email us at info@answerpal.eu

AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium

+32.36416685

BE 0862.692.858