MailLandDocs
RéférenceRéférence de l’API

Marketing

Lists, subscribers, segments, campaigns and automations.

GET/v1/marketing/segments/metadata/fields

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/marketing/segments/metadata/fields"
{  "fields": [    {      "name": "string",      "label": "string",      "type": "string",      "operators": [        "string"      ],      "enumValues": null    }  ]}

Get all automations (paginated)

GET/v1/marketing/automations

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

Limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Cursor?string
Search?string
Status?string

Value in

  • "draft"
  • "active"
  • "paused"
  • "archived"
Trigger?string

Value in

  • "subscriberJoins"
  • "subscriberUpdated"
  • "campaignOpened"
  • "campaignClicked"
  • "dateBased"
  • "manual"
MailingListId?string
SortBy?string
SortDesc?boolean

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/automations"
{  "items": [    {      "id": "string",      "name": "string",      "description": null,      "trigger": "subscriberJoins",      "triggerName": null,      "status": "draft",      "statusName": null,      "mailingListId": null,      "mailingListName": null,      "campaignId": null,      "campaignName": null,      "stepsCount": 0,      "totalEnrolled": 0,      "totalCompleted": 0,      "activatedAt": null,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": null,  "hasMore": true}

Create a new automation

POST/v1/marketing/automations

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get automation by ID

GET/v1/marketing/automations/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/automations/string"
{  "steps": [    {      "order": 0,      "type": "sendEmail",      "typeName": null,      "delayMinutes": null,      "templateId": null,      "subject": null,      "settings": null    }  ],  "totalFailed": 0,  "hasWebhookSigningSecret": true,  "completionRate": 0,  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update an automation

PUT/v1/marketing/automations/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/marketing/automations/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete an automation

DELETE/v1/marketing/automations/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/marketing/automations/string"
Empty

Activate an automation

POST/v1/marketing/automations/{id}/activate

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations/string/activate"
{  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Pause an automation

POST/v1/marketing/automations/{id}/pause

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations/string/pause"
{  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Archive an automation

POST/v1/marketing/automations/{id}/archive

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations/string/archive"
{  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Duplicate an automation

POST/v1/marketing/automations/{id}/duplicate

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Query Parameters

name?string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations/string/duplicate"
{  "id": "string",  "name": "string",  "description": null,  "trigger": "subscriberJoins",  "triggerName": null,  "status": "draft",  "statusName": null,  "mailingListId": null,  "mailingListName": null,  "campaignId": null,  "campaignName": null,  "stepsCount": 0,  "totalEnrolled": 0,  "totalCompleted": 0,  "activatedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST/v1/marketing/automations/{id}/trigger

Enrolls the specified subscribers in the automation. The automation must be active and have a Manual trigger type. Subscribers already enrolled will be skipped.

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to manually trigger an automation for specific subscribers

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations/string/trigger" \  -H "Content-Type: application/json" \  -d '{}'
{  "enrolled": 0,  "requested": 0}
GET/v1/marketing/automations/{id}/webhook-signing-secrets

The HMAC key each Webhook receiver (step URL) of the automation is signed with in X-MLND-Signature, verified exactly like a customer webhook's. Different URLs never share a secret; steps to the same URL are one receiver. Created when an automation with a Webhook step is created or saved, kept across edits for an unchanged URL. Write permission is required because a secret lets its holder forge requests; the response is not cached.

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/marketing/automations/string/webhook-signing-secrets"
{  "secrets": [    {      "webhookUrl": "string",      "secret": "string"    }  ]}
POST/v1/marketing/automations/{id}/webhook-signing-secrets/regenerate

Without a body, gives every receiver a new secret of its own and returns them. With { "webhookUrl": "…" } rotates only that receiver, so one compromised receiver does not force the others to rotate; any receiver whose secret was still shared with another (saved before per-receiver secrets) is split on the way and returned too. Every secret returned has changed. The old secrets stop signing at once, so update the receivers first to accept both. Also how an automation saved before signing existed starts signing.

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/marketing/automations/string/webhook-signing-secrets/regenerate"
{  "secrets": [    {      "webhookUrl": "string",      "secret": "string"    }  ]}

Get all campaigns (paginated)

GET/v1/marketing/campaigns

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

Limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Cursor?string
Search?string
Status?string

Value in

  • "draft"
  • "scheduled"
  • "sending"
  • "sent"
  • "paused"
  • "cancelled"
  • "failed"
Type?string

Value in

  • "regular"
  • "automated"
  • "abTest"
MailingListId?string
SortBy?string
SortDesc?boolean
IncludeArchived?boolean

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/campaigns"
{  "items": [    {      "id": "string",      "name": "string",      "subject": "string",      "previewText": null,      "fromName": "string",      "fromEmail": "string",      "status": "draft",      "statusName": null,      "type": "regular",      "typeName": null,      "mailingListId": null,      "mailingListName": null,      "segmentId": null,      "segmentName": null,      "scheduledAt": null,      "sentAt": null,      "completedAt": null,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "isArchived": true,      "totalRecipients": 0,      "totalSent": 0,      "totalDelivered": 0,      "totalOpened": 0,      "totalClicked": 0,      "totalBounced": 0,      "totalUnsubscribed": 0,      "openTrackingEnabled": true,      "clickTrackingEnabled": true,      "deliveryRate": null,      "openRate": null,      "clickRate": null,      "clickToOpenRate": null,      "bounceRate": null,      "unsubscribeRate": null    }  ],  "nextCursor": null,  "hasMore": true}

Create a new campaign

POST/v1/marketing/campaigns

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Get campaign by ID

GET/v1/marketing/campaigns/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/campaigns/string"
{  "replyTo": null,  "htmlContent": "string",  "textContent": null,  "templateId": null,  "totalComplaints": 0,  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Update a campaign

PUT/v1/marketing/campaigns/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/marketing/campaigns/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Delete a campaign

DELETE/v1/marketing/campaigns/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/marketing/campaigns/string"
Empty
GET/v1/marketing/campaigns/{id}/progress

Separate from the detail endpoint because clients POLL this every 30s while a campaign sends, and the detail response carries the campaign's full rendered HTML body.

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/campaigns/string/progress"
{  "campaignId": "string",  "state": null,  "reasonCode": null,  "totalRecipients": 0,  "sent": 0,  "remaining": 0,  "percentComplete": 0,  "nextEligibleAt": null,  "lastAdmissionAt": null,  "lastAdmittedCount": null,  "lastRequestedCount": null,  "dailyAllowanceRemaining": null,  "estimatedCompletionAtCurrentLimit": null}
GET/v1/marketing/campaigns/{id}/proxy-share

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/campaigns/string/proxy-share"
{  "from": null,  "to": null,  "openedMessages": 0,  "proxyOnlyMessages": 0,  "proxyShare": 0,  "byProvider": {    "google": 0,    "yahoo": 0,    "apple": 0  }}
curl -X GET "https://example.com/v1/marketing/campaigns/string/click-stats"
{  "from": "2019-08-24",  "to": "2019-08-24",  "totalClicks": 0,  "uniqueLinkClicks": 0,  "uniqueClickers": 0,  "filteredBotClicks": 0}

Schedule a campaign

POST/v1/marketing/campaigns/{id}/schedule

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/schedule" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Send a campaign immediately

POST/v1/marketing/campaigns/{id}/send

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/send"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Pause a campaign

POST/v1/marketing/campaigns/{id}/pause

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/pause"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Resume a paused campaign

POST/v1/marketing/campaigns/{id}/resume

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/resume"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Cancel a campaign

POST/v1/marketing/campaigns/{id}/cancel

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/cancel"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Duplicate a campaign

POST/v1/marketing/campaigns/{id}/duplicate

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Query Parameters

name?string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/duplicate"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}
POST/v1/marketing/campaigns/{id}/archive

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/archive"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}

Unarchive a campaign

POST/v1/marketing/campaigns/{id}/unarchive

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/campaigns/string/unarchive"
{  "id": "string",  "name": "string",  "subject": "string",  "previewText": null,  "fromName": "string",  "fromEmail": "string",  "status": "draft",  "statusName": null,  "type": "regular",  "typeName": null,  "mailingListId": null,  "mailingListName": null,  "segmentId": null,  "segmentName": null,  "scheduledAt": null,  "sentAt": null,  "completedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "totalRecipients": 0,  "totalSent": 0,  "totalDelivered": 0,  "totalOpened": 0,  "totalClicked": 0,  "totalBounced": 0,  "totalUnsubscribed": 0,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "deliveryRate": null,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "bounceRate": null,  "unsubscribeRate": null}
GET/v1/marketing/campaigns/{id}/recipients

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Query Parameters

limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Default20
cursor?string
status?string
search?string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/marketing/campaigns/string/recipients"
{  "items": [    {      "email": "string",      "status": "string",      "sentAt": null,      "deliveredAt": null,      "openedAt": null,      "clickedAt": null,      "bouncedAt": null,      "complainedAt": null,      "unsubscribedAt": null,      "openCount": 0,      "clickCount": 0,      "bounceReason": null    }  ],  "nextCursor": null,  "hasMore": true}
GET/v1/marketing/lists

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

Limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Cursor?string
Search?string
IsActive?boolean
SortBy?string
SortDesc?boolean

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/lists"
{  "items": [    {      "id": "string",      "name": "string",      "description": null,      "isActive": true,      "subscriberCount": 0,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": null,  "hasMore": true}

Create a new mailing list

POST/v1/marketing/lists

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/lists" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": null,  "isActive": true,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get mailing list by ID

GET/v1/marketing/lists/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/lists/string"
{  "activeSubscribers": 0,  "unsubscribedCount": 0,  "bouncedCount": 0,  "id": "string",  "name": "string",  "description": null,  "isActive": true,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a mailing list

PUT/v1/marketing/lists/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/marketing/lists/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": null,  "isActive": true,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a mailing list

DELETE/v1/marketing/lists/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/marketing/lists/string"
Empty

Get all segments (paginated)

GET/v1/marketing/segments

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

Limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Cursor?string
Search?string
SortBy?string
SortDesc?boolean

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/segments"
{  "items": [    {      "id": "string",      "name": "string",      "description": null,      "matchType": "all",      "matchTypeName": null,      "conditionsCount": 0,      "subscriberCount": 0,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": null,  "hasMore": true}

Create a new segment

POST/v1/marketing/segments

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/segments" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": null,  "matchType": "all",  "matchTypeName": null,  "conditionsCount": 0,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get segment by ID

GET/v1/marketing/segments/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/segments/string"
{  "conditions": [    {      "field": "string",      "operator": "string",      "value": "string",      "value2": null    }  ],  "cachedCount": null,  "cachedAt": null,  "id": "string",  "name": "string",  "description": null,  "matchType": "all",  "matchTypeName": null,  "conditionsCount": 0,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a segment

PUT/v1/marketing/segments/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/marketing/segments/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": null,  "matchType": "all",  "matchTypeName": null,  "conditionsCount": 0,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a segment

DELETE/v1/marketing/segments/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/marketing/segments/string"
Empty

Preview segment subscribers

GET/v1/marketing/segments/{id}/preview

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Query Parameters

limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Default20
cursor?string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/marketing/segments/string/preview"
{  "count": 0,  "sample": {    "items": [      "string"    ],    "nextCursor": null,    "hasMore": true  }}

Get subscriber count for a segment

GET/v1/marketing/segments/{id}/count

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/segments/string/count"
null
POST/v1/marketing/segments/{id}/duplicate

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Query Parameters

name?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/marketing/segments/string/duplicate"
{  "id": "string",  "name": "string",  "description": null,  "matchType": "all",  "matchTypeName": null,  "conditionsCount": 0,  "subscriberCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Refresh segment cached count

POST/v1/marketing/segments/{id}/refresh

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/segments/string/refresh"
null
POST/v1/marketing/segments/preview

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for previewing segment conditions before saving.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/segments/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "count": 0,  "sampleEmails": [    "string"  ]}
GET/v1/marketing/subscribers

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

Limit?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
Cursor?string
Search?string
MailingListId?string
Status?string

Value in

  • "active"
  • "unsubscribed"
  • "bounced"
  • "complained"
  • "pending"
SortBy?string
SortDesc?boolean

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/subscribers"
{  "items": [    {      "id": "string",      "email": "string",      "firstName": null,      "lastName": null,      "phone": null,      "company": null,      "status": "active",      "statusName": null,      "source": null,      "mailingListId": null,      "mailingListName": null,      "customFields": null,      "subscribedAt": "2019-08-24T14:15:22Z",      "unsubscribedAt": null,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": null,  "hasMore": true}

Create a new subscriber

POST/v1/marketing/subscribers

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/subscribers" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "email": "string",  "firstName": null,  "lastName": null,  "phone": null,  "company": null,  "status": "active",  "statusName": null,  "source": null,  "mailingListId": null,  "mailingListName": null,  "customFields": null,  "subscribedAt": "2019-08-24T14:15:22Z",  "unsubscribedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get subscriber by ID

GET/v1/marketing/subscribers/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/marketing/subscribers/string"
{  "birthday": null,  "emailsSent": 0,  "emailsOpened": 0,  "emailsClicked": 0,  "lastEmailSentAt": null,  "lastEmailOpenedAt": null,  "lastEmailClickedAt": null,  "openTrackingEnabled": true,  "clickTrackingEnabled": true,  "openRate": null,  "clickRate": null,  "clickToOpenRate": null,  "id": "string",  "email": "string",  "firstName": null,  "lastName": null,  "phone": null,  "company": null,  "status": "active",  "statusName": null,  "source": null,  "mailingListId": null,  "mailingListName": null,  "customFields": null,  "subscribedAt": "2019-08-24T14:15:22Z",  "unsubscribedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a subscriber

PUT/v1/marketing/subscribers/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/v1/marketing/subscribers/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "email": "string",  "firstName": null,  "lastName": null,  "phone": null,  "company": null,  "status": "active",  "statusName": null,  "source": null,  "mailingListId": null,  "mailingListName": null,  "customFields": null,  "subscribedAt": "2019-08-24T14:15:22Z",  "unsubscribedAt": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a subscriber

DELETE/v1/marketing/subscribers/{id}

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/marketing/subscribers/string"
Empty

Unsubscribe a subscriber

POST/v1/marketing/subscribers/{id}/unsubscribe

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/subscribers/string/unsubscribe"
{  "message": "string"}

Import subscribers from CSV

POST/v1/marketing/subscribers/import

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/marketing/subscribers/import" \  -H "Content-Type: application/json" \  -d '{}'
{  "imported": 0,  "updated": 0,  "skipped": 0,  "importedNewMembershipForExistingRecipient": 0,  "updatedMembership": 0,  "alreadyMember": 0,  "suppressed": 0,  "skippedDuplicateInFile": 0,  "errors": [    "string"  ]}

Export subscribers to CSV

GET/v1/marketing/subscribers/export

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

mailingListId?string
status?string

Value in

  • "active"
  • "unsubscribed"
  • "bounced"
  • "complained"
  • "pending"

Response Body

text/csv

curl -X GET "https://example.com/v1/marketing/subscribers/export"
{  "fileContents": "string",  "contentType": null,  "fileDownloadName": null,  "lastModified": null,  "entityTag": null,  "enableRangeProcessing": true}

Get subscriber count

GET/v1/marketing/subscribers/count

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

mailingListId?string

Response Body

application/json

curl -X GET "https://example.com/v1/marketing/subscribers/count"
null

Get subscriber stats (counts by status)

GET/v1/marketing/subscribers/stats

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

mailingListId?string

Response Body

application/json

curl -X GET "https://example.com/v1/marketing/subscribers/stats"
{  "total": 0,  "active": 0,  "unsubscribed": 0,  "bounced": 0,  "complained": 0,  "pending": 0}
GET/v1/marketing/subscribers/growth

Authorization

ApiKey
X-API-Key<token>

Your API key, created in the dashboard under API keys. Production sending keys start with ml_pet_ (transactional) or ml_pem_ (marketing); sandbox keys with ml_set_ or ml_sem_.

In: header

Query Parameters

days?|

Number of days to include (default: 30, max: 90)

Match^-?(?:0|[1-9]\d*)$
Formatint32
Default30
mailingListId?string

Optional mailing list filter

Response Body

application/json

curl -X GET "https://example.com/v1/marketing/subscribers/growth"
{  "dataPoints": [    {      "date": "2019-08-24T14:15:22Z",      "newSubscribers": 0,      "unsubscribes": 0,      "cumulativeTotal": 0    }  ],  "totalNew": 0,  "totalUnsubscribes": 0,  "netGrowth": 0,  "currentTotal": 0}