README
@datafire/inboxroute
Client library for Mailsquad
Installation and Usage
npm install --save @datafire/inboxroute
let inboxroute = require('@datafire/inboxroute').create({
mqApiKey: ""
});
.then(data => {
console.log(data);
});
Description
MailSquad offers an affordable and super easy way to create, send and track delightful emails.
Actions
contacts.get
Get a paged result of contacts from a list
inboxroute.contacts.get({}, context)
Input
- input
object
- listid
string
: Unique 16 characters ID of the contact list to get contacts of - offset
integer
: Skip that many records - limit
integer
: Maximum number of items in page - sort
string
: Property to sort by. Append '-' for descending order.
- listid
Output
- output ContactPage
contacts.lists.get
Get a paged result of contact lists.
inboxroute.contacts.lists.get({}, context)
Input
- input
object
- offset
integer
: Skip that many records - limit
integer
: Maximum number of items in page - sort
string
: Property to sort by. Append '-' for descending order.
- offset
Output
- output ContactListPage
contacts.lists.post
Add a new contact list
inboxroute.contacts.lists.post({}, context)
Input
- input
object
- contactlist ContactListUpdate
Output
- output NewId
contacts.lists.listid.delete
Delete an existing contact list
inboxroute.contacts.lists.listid.delete({
"listid": ""
}, context)
Input
- input
object
- listid required
string
: Unique 16 characters ID of the contact list
- listid required
Output
Output schema unknown
contacts.lists.listid.put
Update an existing contact list
inboxroute.contacts.lists.listid.put({
"listid": ""
}, context)
Input
- input
object
- listid required
string
: Unique 16 characters ID of the contact list - contactlist ContactListUpdate
- listid required
Output
Output schema unknown
contacts.contactid.delete
Delete an existing contact
inboxroute.contacts.contactid.delete({
"contactid": ""
}, context)
Input
- input
object
- contactid required
string
: Unique 16 characters ID of the contact
- contactid required
Output
Output schema unknown
contacts.contactid.put
Update an existing contact
inboxroute.contacts.contactid.put({
"contactid": "",
"contact": null
}, context)
Input
- input
object
- contactid required
string
: Unique 16 characters ID of the contact - contact required ContactUpdate
- contactid required
Output
Output schema unknown
subscription.listid.post
Subscribe an email address to a list. This api call has the same behavior as a regular subscribe form. However, single opt-in is allowed for system integration purposes.
- If email address does not exist, a new contact will be added to the list.
- If email address exists custom fields will be updated and status will be put to unconfirmed or active depending of singleoptin value.
- If current status if Active, this operation will only update the custom fields.
- If singleoptin is true, no email confirmation will be sent. In that case, you must provide the subscribe's origin ip and confirmation date-time.
inboxroute.subscription.listid.post({
"listid": "",
"subscription": null
}, context)
Input
- input
object
- listid required
string
: Unique 16 characters ID of the contact list - subscription required SubscriptionRequest
- listid required
Output
Output schema unknown
Definitions
Contact
- Contact
object
- _id
string
: Unique 16 characters ID - clientid
string
: Unique 16 characters ID of the client owner - confirmed
string
: Date+time subscriber confirmed his/her list opt-in - email
string
: Email address - fullname
string
: Full name (Last name, First Name) of the subscriber - ip
string
: Subscriber's IP address when he/she confirmed list opt-in - lang
string
: ISO 639-1 language code of the subscriber. When lang is one the supported system language, all communication - listid
string
: Unique 16 characters ID of the list owner - status
integer
: Status (
- _id
ContactAdd
- ContactAdd
object
- confirmed
string
: Date+time subscriber confirmed his/her list opt-in - email required
string
: Email address - ip
string
: Subscriber's IP address when he/she confirmed list opt-in - listid required
string
: Unique 16 characters ID of the list owner - status
integer
: Status (
- confirmed
ContactCustomFieldSchema
- ContactCustomFieldSchema
object
- key required
string
: equivalent to html form input name attribute - label required
string
: User friendly label describing the field - required
boolean
: Is field required - type required
integer
: Type (
- key required
ContactList
- ContactList
object
- _id
string
: Unique 16 characters ID - clientid
string
: Unique 16 characters ID of the client owner - created
string
- customfields
array
: Array of ContactCustomFieldSchema- items ContactCustomFieldSchema
- eventcustomizations
array
: Array of ContactListEventCustomization - name
string
: Name of the contact list
- _id
ContactListEventCustomization
- ContactListEventCustomization
object
- redirecturl
string
: full url of the destination landing page - type required
integer
: Type (
- redirecturl
ContactListPage
- ContactListPage
object
- page
array
: Array of ContactList for that page- items ContactList
- total
integer
: Total number of items in query
- page
ContactListUpdate
- ContactListUpdate
object
- customfields
array
: Array of ContactCustomFieldSchema- items ContactCustomFieldSchema
- eventcustomizations
array
: Array of ContactListEventCustomization - name
string
: Name of the contact list
- customfields
ContactPage
- ContactPage
object
- page
array
: Array of Contact for that page- items Contact
- total
integer
: Total number of items in query
- page
ContactUpdate
- ContactUpdate
object
- confirmed
string
: Date+time subscriber confirmed his/her list opt-in - email
string
: Email address - ip
string
: Subscriber's IP address when he/she confirmed list opt-in - status
integer
: Status (
- confirmed
NewId
- NewId
object
- _id
string
: The created ressource id
- _id
SubscriptionRequest
- SubscriptionRequest
object
- confirmed
string
: Date-time when subscriber opted-in. Required if singleoptin is true. - email required
string
: Email address of the subscriber - fullname
string
: Full name (Last name, First Name) of the subscriber - ip
string
: Origin Ip of the subscriber when he/she opted-in. Required if singleoptin is true. - lang
string
: ISO 639-1 language code of the subscriber. When lang is one the supported system language, all communication - singleoptin
boolean
: If true, no email will be sent asking user subscription confirmation. In that case, you must provide
- confirmed