Questions? Feedback? powered by Olark live chat software

Newsman API Page

NewsmanSMTP API » NewsmanSMTP API 1.0

NewsmanSMTP API Listing

Account

Method Description
live_counters Returns the counters for this account between "start_date" and "stop_date" grouped by "unit" without considering the send date of actions.
counters Returns the counters for this account between “start_date” and “stop_date” grouped by “unit”.

“start_date” and “stop_date” are the dates in your local timezone (format: YYYY-mm-dd or YYYY-mm-dd HH:MM:SS).
There must be max 180 days (~6 months) between “start_date” and “stop_date”

Returns a dictionary for each of the following actions: send, view, click, unsub, bounce, hardbounce, reject, spam.

For each action there is a dictionary returned with format:
YYYY-mm-dd:
   total: < int >
   utotal: < int >

“total” means the total number of “actions”
“utotal” means the unique number of “actions” (for example unique views)

If “unit” is “hours” for each day, details are added for each hour (unique and total):
YYYY-mm-dd:
   total: < int >
   utotal: < int >
   0:
      u: < int >
      t: < int >
   …
   23:
      u: < int >
      t: < int >

If no information are found for a day or hour, the entry is listed with 0 for the totals.

The counters are calculated based on send_date. So if a view of a message sent yesterday is made today, the view counter incremented is for yesterday (send date).

tags Returns the list of tags associated to this account.

Example:
[
   “confirmation”,
   “billing”
]

history Returns an array of actions descendant sorted for this account

Each entry of the result has the following format:
{
   action: < string >, # name of the action
   timestamp: < int >, # timestamp int representing the time of the action
   data: < dict >, # dictionary with action specific details
}

Email

Method Description
history Returns history for this email in the same format as the account.history.
sending_best Returns the sending best hour and day of week for an email.
Return format is a dictionary with keys: “hour”, “weekday”, “details”

“hour” is from 0 to 23.
“weekday” is from 0 to 6 (0 for Monday, 6 for Sunday)

sending_best_by_weekday Returns the sending best hour for each week day for an email.

“hour” is from 0 to 23.
“weekday” is from 0 to 6 (0 for Monday, 6 for Sunday)

bad_status Return data about number of spam, unsub, bounce, hardbounce for this user for all accounts or just specific account.
Ex: {‘unsub’: 0, ‘hardbounce’: 0, ‘bounce’: 2, ‘spam’: 0}
remove_bad_status Deletes the bad status data for an email for a specific account or for all accounts if account_id is not specified.
add_bad_status Ads a bad status of type: “bad_type” to the bademail collection

Event

Method Description
track Tracks an event for this particular email address. Returns the event id (string).

Send

Method Description
info Returns dict with information about this send_id
content Return the raw content of this send_id if still available. Type can be: raw, txt, html

Tag

Method Description
live_counters Returns live counters for a specific tag in the same format as account.live_counters
counters Returns counters for a specific tag in the same format as account.counters
create Creates a tag for this account
delete Deletes a tag from this account

User

Method Description
accounts Returns list of the accounts for the current user

Message

Method Description
send Sends a mail message over http API
send_raw Sends a mime message over https API
send_template Sends a mail message over http API using a stored template

Sms

Method Description
send Sends a SMS message over http API

Template

Method Description
save Saves a template to the account
get Gets a template for this account
render Renders a template, using the specified template engine and parameters, for this account
delete Deletes a template for this account
all Get all the templates for this acoount