MoonMail API API Reference
Welcome to the MoonMail API reference, which lets you easily inject, repair and burn off recipients and metafields from your space. The MoonMail API is organized around the REST methodology. It uses resource-oriented URLs, and common HTTP response codes to indicate API errors. All requests are authenticated using an api-key
which can be obtained from your
profile.
API Endpoint
https://api2.moonmail.io
Terms of Service: http://support.moonmail.io/terms-and-policies/terms-of-service
Contact: hi@moonmail.io
Schemes: https
Version: 2018-03-08T11:49:37Z
Authentication
api_key
Recipients
Email recipients
Gets a list of recipients
Gets a set recipients of the specified list. You can get the list ID in your MoonMail dashboard, under the Settings tab after selecting your list
The ID of the list the recipient belongs to
Amount of results (default: 10; maximum: 100)
Page to show (default: 1)
OK
Response Content-Types: application/json
Response Example (200 OK)
{
"total": 66139432,
"items": [
{
"listId": "cjetwapd5000dkfedtzbhjoiq",
"metadata": {
"name": "Adeline",
"surname": "Lambert",
"countryCode": "TW",
"foo": "bar"
},
"subscriptionOrigin": "manual",
"isConfirmed": false,
"id": "cjetwapd5000ekfed3pow51tl",
"userId": "cjetwapd5000fkfedewx4u6gw",
"email": "hoega@uwiretvas.bf",
"status": "awaitingConfirmation"
},
{
"listId": "cjetwapd5000gkfedpd9uh60w",
"metadata": {
"name": "David",
"surname": "Brooks",
"countryCode": "NL",
"foo": "bar"
},
"subscriptionOrigin": "api",
"isConfirmed": false,
"id": "cjetwapd5000hkfednzuq0je6",
"userId": "cjetwapd5000ikfed0ynv32os",
"email": "mum@rozo.cm",
"status": "awaitingConfirmation"
},
{
"listId": "cjetwapd5000jkfeds6qylmlf",
"metadata": {
"name": "Jessie",
"surname": "Ward",
"countryCode": "PR",
"foo": "bar"
},
"subscriptionOrigin": "manual",
"isConfirmed": false,
"id": "cjetwapd6000kkfedsac8o904",
"userId": "cjetwapd6000lkfedux28hc5f",
"email": "celipca@gek.gr",
"status": "subscribed"
},
{
"listId": "cjetwapd6000mkfedh6n7jrf9",
"metadata": {
"name": "Carrie",
"surname": "Walton",
"countryCode": "AR",
"foo": "bar"
},
"subscriptionOrigin": "signupForm",
"isConfirmed": false,
"id": "cjetwapd6000nkfedxldbl96c",
"userId": "cjetwapd6000okfedrxu33sg9",
"email": "mibamhoz@ipfa.in",
"status": "subscribed"
},
{
"listId": "cjetwapd6000pkfedt5som7ig",
"metadata": {
"name": "Lura",
"surname": "Marshall",
"countryCode": "LY",
"foo": "bar"
},
"subscriptionOrigin": "api",
"isConfirmed": true,
"id": "cjetwapd6000qkfedn9v7duac",
"userId": "cjetwapd6000rkfednk0bkdke",
"email": "ladugoz@teztuhwa.dj",
"status": "subscribed"
}
]
}
Creates a recipient
Creates a recipient within the specified list. You can get the list ID in your MoonMail dashboard, under the Settings tab after selecting your list
Recipient create request body
The ID of the list the recipient belongs to
Request Content-Types: application/json
Request Example
{
"recipient": {
"metadata": {
"name": "Maurice",
"surname": "Graves",
"countryCode": "PK",
"foo": "bar"
},
"isConfirmed": false,
"email": "wurhaner@ogtetis.bf",
"status": "awaitingConfirmation"
}
}
Request accepted
Recipient malformed
Response Content-Types: application/json
Response Example (202 Accepted)
{
"recipient": {
"id": "cjetwapd00000kfedtr4g729g"
}
}
Response Example (422 Unprocessable Entity)
{
"name": "in eiusmod magna do",
"message": "velit quis nisi"
}
Gets a recipient
Gets a single recipient of the specified list. You can get the list ID in your MoonMail dashboard, under the Settings tab after selecting your list
The ID of the recipient
The ID of the list the recipient belongs to
OK
Recipient not found
Response Content-Types: application/json
Response Example (200 OK)
{
"listId": "cjetwapd7000vkfedllwbhxpg",
"metadata": {
"name": "Hattie",
"surname": "Knight",
"countryCode": "AM",
"foo": "bar"
},
"subscriptionOrigin": "signupForm",
"isConfirmed": false,
"id": "cjetwapd7000wkfed5bmxkduj",
"userId": "cjetwapd7000xkfed5s19i3sl",
"email": "sofa@coz.sn",
"status": "subscribed"
}
Updates a recipient
Updates the specified recipient. You can get the list ID in your MoonMail dashboard, under the Settings tab after selecting your list
Recipient update request body
The ID of the recipient
The ID of the list the recipient belongs to
Request Content-Types: application/json
Request Example
{
"metadata": {
"name": "Hester",
"surname": "Bell",
"countryCode": "AF",
"foo": "bar"
},
"isConfirmed": true,
"status": "awaitingConfirmation"
}
Request accepted
Recipient malformed
Response Content-Types: application/json
Response Example (422 Unprocessable Entity)
{
"name": "in eiusmod magna do",
"message": "velit quis nisi"
}
Lists
Email recipients' lists
Gets all the user's lists
Gets all the recipients' lists of the specified user. You can get the list ID in your MoonMail dashboard, under the Settings tab after selecting your list
OK
Response Content-Types: application/json
Response Example (200 OK)
{
"items": [
{
"unsubscribedCount": 12963037,
"complainedCount": 22459169,
"importStatus": {},
"bouncedCount": 66787912,
"confirmationEmailBody": "enim culpa fugiat nostrud",
"metadataAttributes": {},
"userId": "cjetwapd30001kfedrv5j93io",
"processed": true,
"archived": false,
"createdAt": 1328473,
"total": 839217,
"senderId": "cjetwapd30002kfed1y6a83q4",
"totalPostProcessed": 85632426,
"name": "in",
"subscribedCount": 15670650,
"id": "cjetwapd30003kfedzvizcqhn",
"awaitingConfirmationCount": 76420609,
"successConfirmationUrl": "http://jetukbot.fm/kaepenoh"
},
{
"unsubscribedCount": 66490318,
"complainedCount": 76787753,
"importStatus": {},
"bouncedCount": 7266699,
"confirmationEmailBody": "quis cupidatat ad nulla",
"metadataAttributes": {},
"userId": "cjetwapd40004kfeddgngfk49",
"processed": true,
"archived": false,
"createdAt": 47910553,
"total": 86665606,
"senderId": "cjetwapd40005kfedjovm05s8",
"totalPostProcessed": 18841366,
"name": "vel",
"subscribedCount": 30441159,
"id": "cjetwapd40006kfedv3ip4209",
"awaitingConfirmationCount": 5966461,
"successConfirmationUrl": "http://dajaginic.lu/maj"
},
{
"unsubscribedCount": 8823064,
"complainedCount": 22591148,
"importStatus": {},
"bouncedCount": 52761818,
"confirmationEmailBody": "Excepteur irure",
"metadataAttributes": {},
"userId": "cjetwapd40007kfed579h8gir",
"processed": false,
"archived": false,
"createdAt": 35537530,
"total": 11995007,
"senderId": "cjetwapd40008kfed4e8upxmz",
"totalPostProcessed": 20932724,
"name": "eiusmod Lorem exercitation nisi",
"subscribedCount": 2396101,
"id": "cjetwapd40009kfednsrawf6r",
"awaitingConfirmationCount": 57578518,
"successConfirmationUrl": "http://kuj.io/bufon"
},
{
"unsubscribedCount": 29303931,
"complainedCount": 92111734,
"importStatus": {},
"bouncedCount": 63621094,
"confirmationEmailBody": "voluptate Ut mollit do",
"metadataAttributes": {},
"userId": "cjetwapd5000akfednbqpyu21",
"processed": true,
"archived": true,
"createdAt": 4021658,
"total": 11932564,
"senderId": "cjetwapd5000bkfeddnemip39",
"totalPostProcessed": 27384299,
"name": "mini",
"subscribedCount": 74278179,
"id": "cjetwapd5000ckfedicnrhi2y",
"awaitingConfirmationCount": 88570753,
"successConfirmationUrl": "http://zazhu.fo/sudi"
}
]
}
Schema Definitions
RecipientCreatedResponse: object
Create recipient response
- recipient: object
Example
{
"recipient": {
"id": "cjetwapd00000kfedtr4g729g"
}
}
RecipientMalformed: object
Malformed recipient error
- name: string
- message: string
Example
{
"name": "in eiusmod magna do",
"message": "velit quis nisi"
}
UpdateRecipientRequest: object
Recipient updates model
- metadata: object
- isConfirmed: boolean
- status: string subscribed, awaitingConfirmation, unsubscribed
Example
{
"metadata": {
"name": "Hester",
"surname": "Bell",
"countryCode": "AF",
"foo": "bar"
},
"isConfirmed": true,
"status": "awaitingConfirmation"
}
Lists: object
A set of recipients' lists
- items: object[]
Example
{
"items": [
{
"unsubscribedCount": 12963037,
"complainedCount": 22459169,
"importStatus": {},
"bouncedCount": 66787912,
"confirmationEmailBody": "enim culpa fugiat nostrud",
"metadataAttributes": {},
"userId": "cjetwapd30001kfedrv5j93io",
"processed": true,
"archived": false,
"createdAt": 1328473,
"total": 839217,
"senderId": "cjetwapd30002kfed1y6a83q4",
"totalPostProcessed": 85632426,
"name": "in",
"subscribedCount": 15670650,
"id": "cjetwapd30003kfedzvizcqhn",
"awaitingConfirmationCount": 76420609,
"successConfirmationUrl": "http://jetukbot.fm/kaepenoh"
},
{
"unsubscribedCount": 66490318,
"complainedCount": 76787753,
"importStatus": {},
"bouncedCount": 7266699,
"confirmationEmailBody": "quis cupidatat ad nulla",
"metadataAttributes": {},
"userId": "cjetwapd40004kfeddgngfk49",
"processed": true,
"archived": false,
"createdAt": 47910553,
"total": 86665606,
"senderId": "cjetwapd40005kfedjovm05s8",
"totalPostProcessed": 18841366,
"name": "vel",
"subscribedCount": 30441159,
"id": "cjetwapd40006kfedv3ip4209",
"awaitingConfirmationCount": 5966461,
"successConfirmationUrl": "http://dajaginic.lu/maj"
},
{
"unsubscribedCount": 8823064,
"complainedCount": 22591148,
"importStatus": {},
"bouncedCount": 52761818,
"confirmationEmailBody": "Excepteur irure",
"metadataAttributes": {},
"userId": "cjetwapd40007kfed579h8gir",
"processed": false,
"archived": false,
"createdAt": 35537530,
"total": 11995007,
"senderId": "cjetwapd40008kfed4e8upxmz",
"totalPostProcessed": 20932724,
"name": "eiusmod Lorem exercitation nisi",
"subscribedCount": 2396101,
"id": "cjetwapd40009kfednsrawf6r",
"awaitingConfirmationCount": 57578518,
"successConfirmationUrl": "http://kuj.io/bufon"
},
{
"unsubscribedCount": 29303931,
"complainedCount": 92111734,
"importStatus": {},
"bouncedCount": 63621094,
"confirmationEmailBody": "voluptate Ut mollit do",
"metadataAttributes": {},
"userId": "cjetwapd5000akfednbqpyu21",
"processed": true,
"archived": true,
"createdAt": 4021658,
"total": 11932564,
"senderId": "cjetwapd5000bkfeddnemip39",
"totalPostProcessed": 27384299,
"name": "mini",
"subscribedCount": 74278179,
"id": "cjetwapd5000ckfedicnrhi2y",
"awaitingConfirmationCount": 88570753,
"successConfirmationUrl": "http://zazhu.fo/sudi"
}
]
}
RecipientsList: object
A list of recipients
- total: integer x ≥ 0
-
Count of the recipients contained in the list
- items: object[]
Example
{
"total": 66139432,
"items": [
{
"listId": "cjetwapd5000dkfedtzbhjoiq",
"metadata": {
"name": "Adeline",
"surname": "Lambert",
"countryCode": "TW",
"foo": "bar"
},
"subscriptionOrigin": "manual",
"isConfirmed": false,
"id": "cjetwapd5000ekfed3pow51tl",
"userId": "cjetwapd5000fkfedewx4u6gw",
"email": "hoega@uwiretvas.bf",
"status": "awaitingConfirmation"
},
{
"listId": "cjetwapd5000gkfedpd9uh60w",
"metadata": {
"name": "David",
"surname": "Brooks",
"countryCode": "NL",
"foo": "bar"
},
"subscriptionOrigin": "api",
"isConfirmed": false,
"id": "cjetwapd5000hkfednzuq0je6",
"userId": "cjetwapd5000ikfed0ynv32os",
"email": "mum@rozo.cm",
"status": "awaitingConfirmation"
},
{
"listId": "cjetwapd5000jkfeds6qylmlf",
"metadata": {
"name": "Jessie",
"surname": "Ward",
"countryCode": "PR",
"foo": "bar"
},
"subscriptionOrigin": "manual",
"isConfirmed": false,
"id": "cjetwapd6000kkfedsac8o904",
"userId": "cjetwapd6000lkfedux28hc5f",
"email": "celipca@gek.gr",
"status": "subscribed"
},
{
"listId": "cjetwapd6000mkfedh6n7jrf9",
"metadata": {
"name": "Carrie",
"surname": "Walton",
"countryCode": "AR",
"foo": "bar"
},
"subscriptionOrigin": "signupForm",
"isConfirmed": false,
"id": "cjetwapd6000nkfedxldbl96c",
"userId": "cjetwapd6000okfedrxu33sg9",
"email": "mibamhoz@ipfa.in",
"status": "subscribed"
},
{
"listId": "cjetwapd6000pkfedt5som7ig",
"metadata": {
"name": "Lura",
"surname": "Marshall",
"countryCode": "LY",
"foo": "bar"
},
"subscriptionOrigin": "api",
"isConfirmed": true,
"id": "cjetwapd6000qkfedn9v7duac",
"userId": "cjetwapd6000rkfednk0bkdke",
"email": "ladugoz@teztuhwa.dj",
"status": "subscribed"
}
]
}
CreateRecipientRequest: object
Recipient's model
- recipient: object
-
New recipient
Example
{
"recipient": {
"metadata": {
"name": "Maurice",
"surname": "Graves",
"countryCode": "PK",
"foo": "bar"
},
"isConfirmed": false,
"email": "wurhaner@ogtetis.bf",
"status": "awaitingConfirmation"
}
}
List: object
Email list's model
- unsubscribedCount: integer x ≥ 0
- complainedCount: integer x ≥ 0
- importStatus: object
- bouncedCount: integer x ≥ 0
- confirmationEmailBody: string
- metadataAttributes: object
- userId: string (cuid)
- processed: boolean
- archived: boolean
- createdAt: integer x ≥ 0
- total: integer x ≥ 0
- senderId: string (cuid)
- totalPostProcessed: integer x ≥ 0
- name: string
- subscribedCount: integer x ≥ 0
- id: string (cuid)
- awaitingConfirmationCount: integer x ≥ 0
- successConfirmationUrl: string
Example
{
"unsubscribedCount": 86032036,
"complainedCount": 64582451,
"importStatus": {},
"bouncedCount": 56503393,
"confirmationEmailBody": "ullamco adipis",
"metadataAttributes": {},
"userId": "cjetwapd7000skfedpu8walgx",
"processed": false,
"archived": true,
"createdAt": 23833989,
"total": 2738490,
"senderId": "cjetwapd7000tkfed710f3qpm",
"totalPostProcessed": 15833028,
"name": "mollit in Excepteur laboris",
"subscribedCount": 72572893,
"id": "cjetwapd7000ukfediibmdoz1",
"awaitingConfirmationCount": 11954309,
"successConfirmationUrl": "http://pedi.kw/fatu"
}
Recipient: object
Recipient's model
- listId: string (cuid)
- metadata: object
- subscriptionOrigin: string signupForm, manual, listImport, api
- isConfirmed: boolean
- id: string (cuid)
- userId: string (cuid)
- email: string
- status: string awaitingConfirmation, subscribed
Example
{
"listId": "cjetwapd7000vkfedllwbhxpg",
"metadata": {
"name": "Hattie",
"surname": "Knight",
"countryCode": "AM",
"foo": "bar"
},
"subscriptionOrigin": "signupForm",
"isConfirmed": false,
"id": "cjetwapd7000wkfed5bmxkduj",
"userId": "cjetwapd7000xkfed5s19i3sl",
"email": "sofa@coz.sn",
"status": "subscribed"
}
NewRecipient: object
New recipient
- metadata: object
- isConfirmed: boolean
- email: string (email)
- status: string subscribed, awaitingConfirmation
Example
{
"metadata": {
"name": "Gussie",
"surname": "Peters",
"countryCode": "VA",
"foo": "bar"
},
"isConfirmed": false,
"email": "ok@sizuvak.lk",
"status": "awaitingConfirmation"
}