Skip to content
Viewing campaigns

Viewing campaigns

By Loïc Bresler 5 min read

These methods read campaigns and their results. They change nothing.

They are all called with POST, with a JSON body that contains your api_key. Parameter tables do not repeat it. See the common rules.

campaign_list or campaigns_stats?

Both methods list campaigns, but not with the same scope:

campaign_listcampaigns_stats
Campaignsall, whatever their statussent only
Periodfull historythe last month
Accountsthe account onlythe account and its direct sub-accounts
Statisticsnoyes (opens, clicks, bounces, unsubscribes)
Paginationyes (limit, offset)no
IPdeclared IP requiredany IP

campaign_list is for managing your campaigns: finding a draft, following a status. campaigns_stats is for a dashboard of recent sends, especially for a reseller and its sub-accounts.

List campaigns

Access point: https://www.mdworks.fr/api_http/campaign_list

This method returns the account’s email campaigns, from the most recent to the oldest.

Parameters:

ParameterTypeRequiredDefaultDescription
limitintegerno50number of campaigns returned, from 1 to 500
offsetintegerno0number of campaigns to skip (pagination)
statustextnoalldraft, scheduled, partially_sent, sent or automatic (see statuses)

Example of posted data:

{
  "api_key": "YOUR_API_KEY",
  "status": "draft",
  "limit": 50
}

Response:

{
  "total": 87,
  "limit": 50,
  "offset": 0,
  "campaigns": [
    {
      "id": 123456,
      "reference": "November newsletter",
      "subject": "What's new in November",
      "status": "draft",
      "created_at": "2026-11-28T00:38:05+01:00",
      "sent_at": null,
      "scheduled_at": null,
      "recipients": 0
    }
  ]
}
FieldDescription
totalnumber of campaigns matching the filter
referenceinternal name of the campaign, the one shown in the interface’s campaign list
subjectsubject of the message
statuscampaign status
created_at, sent_at, scheduled_atISO 8601 dates, Paris time. sent_at is only filled for sent, scheduled_at only for scheduled
recipientsnumber of recipients loaded

To paginate, increase offset by the value of limit as long as offset stays below total. A/B test variants are excluded, as in the interface.

Errors:

MessageCause
Error limit must be between 1 and 500
Error offset must be 0 or more
Error status must be draft, scheduled, partially_sent, sent or automatic

Retrieve a campaign’s details

Access point: https://www.mdworks.fr/api_http/campaign_get

This method returns the settings of a campaign. It is also used to read a campaign back after a campaign_update.

Only the account that created the campaign can access it: a parent account’s key does not see its sub-accounts’ campaigns.

Parameters:

ParameterTypeRequiredDescription
campaign_idintegeryesID of the campaign

Example of posted data:

{
  "api_key": "YOUR_API_KEY",
  "campaign_id": 123456
}

Response:

{
  "id": 123456,
  "reference": "November newsletter",
  "subject": "What's new in November",
  "from_name": "Example Team",
  "from_email": "contact@example.com",
  "reply_to": "contact@example.com",
  "recipient_name": "Dear customer",
  "preheader": "Three new things to discover",
  "status": "draft",
  "created_at": "2026-11-28T00:38:05+01:00",
  "sent_at": null,
  "scheduled_at": null,
  "recipients": 0,
  "unsubscribe_link": 1,
  "bounce_management": 0,
  "language": "UK",
  "folder_id": 0,
  "charset": "iso-8859-1"
}

Fields shared with campaign_list have the same meaning. The others:

FieldDescription
from_name, from_emailsender name and email. With bounce_management set to 1, from_email is the full address, return domain included
reply_toreply-to email, empty if none
recipient_namename displayed for the recipient
preheadertext shown below the subject by some mail clients, empty if none
unsubscribe_link1 if the unsubscribe link is inserted
bounce_management1 if automatic bounce handling is active (see campaign_create)
languagefooter language: DE, UK, AR, ES, FR, IT, PT, NL, PO, CZ or HU, as for the campaign_create parameter. Can be null
folder_idfiling folder, 0 if none
charsetcharacter set of the campaign

Errors:

MessageCause
Error campaign_id is missing or is not numeric
Error this user don't have access to campaign_idcampaign does not exist or belongs to another account

Statistics of sent campaigns

Access point: https://www.mdworks.fr/api_http_open/campaigns_stats

This method returns the campaigns sent over the last month by an account and its direct sub-accounts, with the statistics obtained. These figures are cached for up to one hour.

It is not restricted by IP, because no personal data is transmitted.

Parameters: none apart from api_key.

Example of posted data:

{"api_key": "YOUR_API_KEY"}

Response: an array of objects.

[
  {
    "id": "688646",
    "user_id": "1474",
    "user": "account1",
    "reference": "My test campaign",
    "subject": "TEST SEND 19:20",
    "sent": "2021-02-10 19:26:01.000000",
    "volume": "1300",
    "open_unique": "260",
    "open": "340",
    "click_unique": "25",
    "click": 50,
    "hard_bounce": 10,
    "soft_bounce": 4,
    "unsubscribe": 2
  },
  {
    "id": "688644",
    "user_id": "1478",
    "user": "account2",
    "reference": "My second test campaign",
    "subject": "TEST SEND",
    "sent": "2021-02-10 19:05:15.000000",
    "volume": "4151",
    "open_unique": "1230",
    "open": "1340",
    "click_unique": "47",
    "click": 75,
    "hard_bounce": 5,
    "soft_bounce": 0,
    "unsubscribe": 30
  }
]
FieldDescription
idID of the campaign
user_id, userID and login of the account that sent the campaign
referenceinternal name of the campaign
subjectsubject of the message
sentdate and time of sending
volumenumber of emails sent
open_unique, openunique and total opens
click_unique, clickunique and total clicks
hard_bounce, soft_bouncepermanent and temporary bounces
unsubscribeunsubscribes

Per-recipient sending results

Access point: https://www.mdworks.fr/api_http/campaign_results

This method returns the recipients of a sent campaign, with the sending status of each one. It is restricted to declared IPs.

30 days after sending, the sending history is archived and this information is no longer available.

Parameters:

ParameterTypeRequiredDescription
campaign_idintegeryesID of the campaign

Example of posted data:

{
  "api_key": "YOUR_API_KEY",
  "campaign_id": "234433"
}

Response: an array of objects.

[
  {
    "email": "test@test.com",
    "status": "clicked",
    "bounceCat": "",
    "dsnMta": "mx3.ovh.net (91.121.56.64)",
    "dsnDiag": "smtp;250 2.0.0 Ok: queued as 4Stsl60YVKz1xxl",
    "clicks": ["https://www.example.com/news"],
    "timeLogged": "2023-10-22 15:01:18"
  },
  {
    "email": "test3@test5.com",
    "status": "hard_bounce",
    "bounceCat": "bad-domain",
    "dsnMta": "",
    "dsnDiag": "bad destination system: no such domain",
    "clicks": [],
    "timeLogged": "2023-10-22 15:01:21"
  }
]
FieldDescription
emailrecipient address. For a masked (encrypted) address, its MD5 hash is returned
statussending status, see below
bounceCatbounce category, if rejected
dsnMtainformation about the recipient’s mail server
dsnDiagraw response from the recipient’s mail server
clickslist of clicked URLs, if any
timeLoggedsending timestamp, if available

Possible values for status:

statusMeaning
emptyno information
openedemail opened
clickedlink clicked in the email (it can therefore be considered opened)
unsubunsubscribed
soft_bounceemail temporarily rejected
hard_bounceundeliverable email address

Errors:

MessageCause
Error campaign_id is missing or is not numeric
Error this user don't have access to campaign_idcampaign does not exist or belongs to another account
This campaign is in draft modethe campaign has not been sent yet
This campaign is archivedthe send is more than 30 days old
Last updated on