LianaMailer REST API

Account

Server

Get the account details, sent mail counts, statistics, deliverability ratings and received SMS messages, and manage the marketing settings and LianaAutomation tracking.


Get account details

POST
https://rest.lianamailer.com/api
/v1/getCustomer

Returns the settings and enabled services of your customer account, including information about your default site. Boolean settings are returned as 1 or 0.

Get account details › Responses

OK

succeed
​boolean

Response status.

Example: true
​object

Get customer ID

POST
https://rest.lianamailer.com/api
/v1/getCustomerId

Returns the ID of the customer account that your API credentials belong to.

Get customer ID › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​CustomerId

Customer ID.

Example: 1

Get account statistics

POST
https://rest.lianamailer.com/api
/v1/getStatistics

Returns account-level statistics: database size, active, unsubscribed and deleted member counts, recent joins and unsubscriptions, and sent email and SMS counts. Most values are precomputed by scheduled tasks, so they may not include the latest changes. The *_by_day and *_by_month values are strings that you need to parse.

Get account statistics › Responses

OK

succeed
​boolean

Response status.

Example: true
​CustomerStatistics

Customer statistics.


Get sent mail count

POST
https://rest.lianamailer.com/api
/v1/sentMails

Returns the number of mails in your deliveries scheduled within the date range. Cancelled deliveries are not counted. Finished deliveries count the mails actually delivered, and unfinished ones count the planned contacts. This is the same count that the monthly message limit uses. A to date without a time means the start of that day.

Get sent mail count › Request Body

params
​required

Date range.

Get sent mail count › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​integer

Number of mails sent during the given time range.

Example: 3088

Get deliverability ratings

POST
https://rest.lianamailer.com/api
/v1/getDeliverabilityRating

Returns the history of the account's deliverability rating, newest entry first. Each entry has the total rating and the scores it is calculated from, where higher is better. Use count and offset to page through older entries. Returns an empty array if no rating has been calculated yet.

Get deliverability ratings › Request Body

count
​integer

Number of rating entries to return, at most 100. Defaults to 1.

Example: 20
offset
​integer

Number of entries to skip. Defaults to 0.

Example: 10

Get deliverability ratings › Responses

OK

succeed
​boolean

Response status.

Example: true

Array of deliverability rating entries.


Get received SMS

POST
https://rest.lianamailer.com/api
/v1/reportSMSReceived

Returns all SMS messages sent by your contacts or to your SMS keywords, as semicolon-separated CSV text, oldest first. The columns are source, msg, time, dest and keyword. There are no date or other filters.

Get received SMS › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​string

Results in CSV format.

Example: source;msg;time;dest;keyword

Get marketing settings

POST
https://rest.lianamailer.com/api
/v1/getMarketingSettings

Returns the marketing settings of your account as key-value rows. They apply to all your sites and are included in the marketing data of site and sites. Change them with setMarketingSettings.

Get marketing settings › Responses

OK

succeed
​boolean

Response status.

Example: true
​object[]

Set marketing settings

POST
https://rest.lianamailer.com/api
/v1/setMarketingSettings

Saves marketing settings for your account, see getMarketingSettings. Settings not in the request are kept. This method cannot remove settings.

Set marketing settings › Request Body

​object · required

Settings to save as key-value pairs. Existing keys are updated and new keys are added.

Example: {"name":"message text"}

Set marketing settings › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​integer

1 if the settings were saved. 0 if settings is empty or the last setting could not be saved.

Example: 1

Set LianaAutomation tracking

POST
https://rest.lianamailer.com/api
/v1/setCEMTracking

Turns LianaAutomation tracking on or off for your account. When it is on, clicks on tracked links go through the LianaAutomation tracker before the target page, so that the visit can be linked to the contact. It has an effect only when your account has a LianaAutomation integration.

Set LianaAutomation tracking › Request Body

state
​boolean · required

Whether LianaAutomation tracking is enabled.

Example: true

Set LianaAutomation tracking › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​integer

Returns 1 on success.

Example: 1