Easymailing
Email campaigns

List email campaigns

GET /campaigns

GET/campaigns

Returns the email campaigns of your account, newest first, with their status (draft, scheduled, sending, sent...), type, audience and configuration. SMS campaigns are not included: they have their own list.

When to use: To find a campaign by name, status, type or audience, to see what was sent last, or to get the UUID that the other campaign operations ask for.

When not to use: To read one campaign in full, with its recipient count and delivery warnings, use get_campaign. For SMS campaigns, use list_sms_campaigns.

Filters: Default order: newest created first.

  • title: campaigns whose name contains the text.
  • status: exact status, for example campaign.status.sent (same values as the status field).
  • type: exact type, for example campaign.regular or campaign.test.ab (same values as the type field). Automation campaigns (campaign.automation) are listed too.
  • hash: exact hash of the campaign, the code that follows em_ch= in the links of its emails.
  • audience: UUID of the audience.

Sorting: order[createdAt], order[updatedAt], order[status], order[startedAt] (when sending began) or order[finishedAt] (when it ended), each asc or desc. The newest created campaign is not always the last one sent: for the last sent, combine status=campaign.status.sent with order[startedAt]=desc&itemsPerPage=1.

Permissions: Requires the viewer role or higher, or the marketing.campaigns.read capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Query Parameters

page?integer

Page number, starting at 1.

Default1
itemsPerPage?integer

Number of campaigns per page (default 30, maximum 50).

Range0 <= value <= 50
Default30
title?string

Return only campaigns whose name contains this text.

status?string

Return only campaigns in this status, with the same value as the status field of a campaign.

type?string

Return only campaigns of this type, with the same value as the type field of a campaign.

hash?string

Return only the campaign with this hash: the code that follows em_ch= in the links of its emails.

audience?string

Return only campaigns of the audience with this UUID (the UUID alone, not the IRI).

Response Body

application/problem+json

application/problem+json

curl -X GET "https://api.easymailing.com/campaigns?page=1&itemsPerPage=30&title=Black+Friday&status=campaign.status.sent&type=campaign.regular&hash=ELGMiR3jr3pHxR4P5AS0sX&audience=0df14405-90ff-4287-b3e4-ef088901ee6f" \  -H "X-Auth-Token: YOUR_API_KEY"
[  {    "template_thumbnail": "http://example.com",    "email_config": {      "from_name": "string",      "from_email": "/entity/1",      "reply_to": "/entity/1",      "enable_to_name": true,      "to_name": "string",      "subject": "string",      "preview_text": "string"    },    "campaign_config": {      "track_opens": true,      "track_clicks": true,      "track_ecommerce": true,      "use_conversations": true,      "public": true,      "track_google_analytics": true,      "google_analytics_tag": "string"    },    "campaign_config_send": {      "schedule_mailing": true,      "schedule_mailing_date": "2019-08-24T14:15:22Z",      "send_confirmation_email": true,      "mailing_confirm_emails": [        "user@example.com"      ]    },    "campaign_stats": {      "sent": 0,      "delivered": 0,      "clicks": 0,      "unique_clicks": 0,      "opens": 0,      "unique_opens": 0,      "complaints": 0,      "soft_bounces": 0,      "hard_bounces": 0,      "unsubscriptions": 0,      "delivered_rate": 0,      "open_rate": 0,      "click_rate": 0,      "bounce_rate": 0,      "complaint_rate": 0,      "score": 0,      "ctor": 0,      "unsuscribe_rate": 0,      "cleaned": 0,      "to_send": 0,      "revenue": 0,      "orders": 0,      "order_rate": 0    },    "test_config": {      "type": "string",      "test_size": 0,      "winner_metric": "string",      "delay_value": 0,      "delay_unit": "string"    },    "variants": [      {        "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",        "subject": "string",        "preview_text": "string",        "from_name": "string",        "from_email": "/entity/1",        "template": "/entity/1",        "template_thumbnail": "string",        "sort": 0,        "delivered": 0,        "opens": 0,        "clicks": 0,        "open_rate": 0,        "click_rate": 0,        "winner": true      }    ],    "template": "/entity/1",    "id": 0,    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",    "title": "string",    "status": "campaign.status.draft",    "type": "campaign.regular",    "channel": "email",    "send_to": "string",    "audience": "string",    "list_segment": "/entity/1",    "groups": [      "string"    ],    "hash": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "started_at": "2019-08-24T14:15:22Z",    "finished_at": "2019-08-24T14:15:22Z",    "contact_targeting": {      "kind": "segment",      "contact_segment": "/entity/1",      "contact_segment_name": "string",      "contact_segment_deleted": true,      "revision_status": "following_latest",      "pinned_at": "2019-08-24T14:15:22Z",      "error_code": "string",      "filter": {        "match": "all",        "conditions": [          {            "field": "string",            "operator": "string",            "value": null,            "audience": "0ff0092a-9631-4ad5-a4dd-fe4329a52f3b",            "match": "all",            "conditions": [              {}            ]          }        ]      }    }  }]