Marketing
Lists, subscribers, segments, campaigns and automations.
/v1/marketing/segments/metadata/fieldsAuthorization
ApiKey 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 } ]}/v1/marketing/automationsAuthorization
ApiKey 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
^-?(?:0|[1-9]\d*)$int32Value in
- "draft"
- "active"
- "paused"
- "archived"
Value in
- "subscriberJoins"
- "subscriberUpdated"
- "campaignOpened"
- "campaignClicked"
- "dateBased"
- "manual"
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}/v1/marketing/automationsAuthorization
ApiKey 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"}/v1/marketing/automations/{id}Authorization
ApiKey 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
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"}/v1/marketing/automations/{id}Authorization
ApiKey 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
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"}/v1/marketing/automations/{id}Authorization
ApiKey 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
Response Body
application/json
curl -X DELETE "https://example.com/v1/marketing/automations/string"/v1/marketing/automations/{id}/activateAuthorization
ApiKey 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
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"}/v1/marketing/automations/{id}/pauseAuthorization
ApiKey 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
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"}/v1/marketing/automations/{id}/archiveAuthorization
ApiKey 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
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"}/v1/marketing/automations/{id}/duplicateAuthorization
ApiKey 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
Query Parameters
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"}/v1/marketing/automations/{id}/triggerEnrolls 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 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
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}/v1/marketing/automations/{id}/webhook-signing-secretsThe 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 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
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" } ]}/v1/marketing/automations/{id}/webhook-signing-secrets/regenerateWithout 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 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
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" } ]}/v1/marketing/campaignsAuthorization
ApiKey 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
^-?(?:0|[1-9]\d*)$int32Value in
- "draft"
- "scheduled"
- "sending"
- "sent"
- "paused"
- "cancelled"
- "failed"
Value in
- "regular"
- "automated"
- "abTest"
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}/v1/marketing/campaignsAuthorization
ApiKey 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}/v1/marketing/campaigns/{id}Authorization
ApiKey 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
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}/v1/marketing/campaigns/{id}Authorization
ApiKey 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
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}/v1/marketing/campaigns/{id}Authorization
ApiKey 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
Response Body
application/json
curl -X DELETE "https://example.com/v1/marketing/campaigns/string"/v1/marketing/campaigns/{id}/progressSeparate 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 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
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}/v1/marketing/campaigns/{id}/proxy-shareAuthorization
ApiKey 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
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 }}/v1/marketing/campaigns/{id}/click-statsAuthorization
ApiKey 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
Response Body
application/json
application/json
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}/v1/marketing/campaigns/{id}/scheduleAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/sendAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/pauseAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/resumeAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/cancelAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/duplicateAuthorization
ApiKey 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
Query Parameters
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}/v1/marketing/campaigns/{id}/archiveAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/unarchiveAuthorization
ApiKey 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
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}/v1/marketing/campaigns/{id}/recipientsAuthorization
ApiKey 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
Query Parameters
^-?(?:0|[1-9]\d*)$int3220Response 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}/v1/marketing/listsAuthorization
ApiKey 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
^-?(?:0|[1-9]\d*)$int32Response 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}/v1/marketing/listsAuthorization
ApiKey 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"}/v1/marketing/lists/{id}Authorization
ApiKey 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
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"}/v1/marketing/lists/{id}Authorization
ApiKey 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
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"}/v1/marketing/lists/{id}Authorization
ApiKey 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
Response Body
application/json
curl -X DELETE "https://example.com/v1/marketing/lists/string"/v1/marketing/segmentsAuthorization
ApiKey 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
^-?(?:0|[1-9]\d*)$int32Response 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}/v1/marketing/segmentsAuthorization
ApiKey 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"}/v1/marketing/segments/{id}Authorization
ApiKey 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
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"}/v1/marketing/segments/{id}Authorization
ApiKey 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
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"}/v1/marketing/segments/{id}Authorization
ApiKey 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
Response Body
application/json
curl -X DELETE "https://example.com/v1/marketing/segments/string"/v1/marketing/segments/{id}/previewAuthorization
ApiKey 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
Query Parameters
^-?(?:0|[1-9]\d*)$int3220Response 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 }}/v1/marketing/segments/{id}/countAuthorization
ApiKey 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
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/marketing/segments/string/count"null/v1/marketing/segments/{id}/duplicateAuthorization
ApiKey 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
Query Parameters
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"}/v1/marketing/segments/{id}/refreshAuthorization
ApiKey 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
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/marketing/segments/string/refresh"null/v1/marketing/segments/previewAuthorization
ApiKey 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" ]}/v1/marketing/subscribersAuthorization
ApiKey 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
^-?(?:0|[1-9]\d*)$int32Value in
- "active"
- "unsubscribed"
- "bounced"
- "complained"
- "pending"
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}/v1/marketing/subscribersAuthorization
ApiKey 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"}/v1/marketing/subscribers/{id}Authorization
ApiKey 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
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"}/v1/marketing/subscribers/{id}Authorization
ApiKey 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
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"}/v1/marketing/subscribers/{id}Authorization
ApiKey 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
Response Body
application/json
curl -X DELETE "https://example.com/v1/marketing/subscribers/string"/v1/marketing/subscribers/{id}/unsubscribeAuthorization
ApiKey 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
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/marketing/subscribers/string/unsubscribe"{ "message": "string"}/v1/marketing/subscribers/importAuthorization
ApiKey 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" ]}/v1/marketing/subscribers/exportAuthorization
ApiKey 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
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}/v1/marketing/subscribers/countAuthorization
ApiKey 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
Response Body
application/json
curl -X GET "https://example.com/v1/marketing/subscribers/count"null/v1/marketing/subscribers/statsAuthorization
ApiKey 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
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}/v1/marketing/subscribers/growthAuthorization
ApiKey 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
Number of days to include (default: 30, max: 90)
^-?(?:0|[1-9]\d*)$int3230Optional 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}