LianaMailer REST API

Deliveries

Server

Follow the mails sent to groups of contacts, right away or at a scheduled time: find deliveries, check their status, and cancel, reschedule or hide them. To send mail, use the v2 Sending endpoints.


Get delivery

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

Returns one delivery as an array with one item, or an empty array if the delivery does not exist, is hidden or is not yours. Without id, returns all your mailing list deliveries. To get several deliveries by ID, use getDeliveries, and for one page or date range, getDeliveriesRange.

Get delivery › Request Body

id
​integer

Delivery ID. If omitted, all your mailing list deliveries are returned.

Example: 10

Get delivery › Responses

OK

succeed
​boolean

Response status.

Example: true
​Delivery[]

Get deliveries by ID

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

Returns the deliveries with the given IDs, or all your mailing list deliveries if ids is empty. Hidden deliveries and deliveries that are not yours are left out. To get the deliveries one page or date range at a time, use getDeliveriesRange.

Get deliveries by ID › Request Body

ids
​DeliveryId[]

Delivery IDs. If omitted or empty, all your mailing list deliveries are returned.

Get deliveries by ID › Responses

OK

succeed
​boolean

Response status.

Example: true
​Delivery[]

Array of deliveries.


Get deliveries by range

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

Returns your mailing list deliveries one page or one date range at a time. Hidden deliveries are not included. getDeliveriesRangeCSV returns the same data as CSV.

Get deliveries by range › Request Body

Number of deliveries to skip as an integer, or a start date such as 2019-12-20 to return deliveries scheduled on or after that day.

Example: 2019-12-20

Maximum number of deliveries as an integer, or an end date such as 2020-01-31 to return deliveries scheduled on or before that day. 0 means no limit.

Example: 100
sort
​string

Sort key: created, subject, id, members, bounced, campaign, list_id or scheduled, optionally followed by ASC or DESC. Defaults to created DESC.

Example: created ASC

Get deliveries by range › Responses

OK

succeed
​boolean

Response status.

Example: true
​Delivery[]

Array of deliveries.


Get deliveries by range as CSV

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

Returns the same deliveries as getDeliveriesRange as CSV text, with a header row and fields separated by semicolons. Array fields, such as tags, are joined with commas, and subject, html and plain are Base64-encoded.

Get deliveries by range as CSV › Request Body

Number of deliveries to skip as an integer, or a start date such as 2019-12-20 to return deliveries scheduled on or after that day.

Example: 2019-12-20

Maximum number of deliveries as an integer, or an end date such as 2020-01-31 to return deliveries scheduled on or before that day. 0 means no limit.

Example: 100
sort
​string

Sort key: created, subject, id, members, bounced, campaign, list_id or scheduled, optionally followed by ASC or DESC. Defaults to created DESC.

Example: created ASC

Get deliveries by range as CSV › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​DeliveryCsv

Deliveries in CSV format.

Example: "id";"mail_id";"owner";"members";"delivered";"bounced";"created";"scheduled";"subject";"clicks";"clickers";"opens";"openers";"noopeners";"list_id";"list_name";"list_deleted";"list_hidden";"archive";"rss";"html";"plain";"campaign";"smscount";"excluded";"unsubscribed";"direct_unsubscriptions";"direct_subscriptions";"done";"smsreceived";"type";"user_id";"user_display_name";"tags";

Get scheduled deliveries

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

Returns the deliveries that are scheduled for a future time and are not sent or cancelled yet.

Get scheduled deliveries › Request Body

num
​integer

Maximum number of deliveries to return. 0 returns all.

Example: 10
reverse
​integer

Set to 1 to sort by scheduled time in descending order. Defaults to ascending.

Example: 0

Get scheduled deliveries › Responses

OK

succeed
​boolean

Response status.

Example: true
​object[]

Array of scheduled deliveries.


Get event delivery IDs

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

Returns the IDs of all deliveries of type event in your account, including hidden ones. getDeliveries returns the type of each delivery.

Get event delivery IDs › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​array

Delivery IDs.

Example: [11,19]

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

Returns the IDs of the deliveries related to a delivery, such as the other deliveries of a multi-list or A/B delivery. Returns an empty array if there are none. To cancel a delivery together with its related deliveries, use cancelDeliveryRelated.

id
​DeliveryId · required

Delivery ID.

Example: 10

OK

succeed
​boolean

Response status.

Example: true
result
​DeliveryId[]

Array of related delivery IDs.


Get delivery statuses

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

Returns the sending progress of several deliveries at once: the number of contacts and delivered messages, and whether sending is done. members does not include excluded contacts. Deliveries that are not yours are left out, and an error is returned if none of the deliveries is found. For the full details of one delivery, use getDeliveryReport.

Get delivery statuses › Request Body

deliveries
​integer[] · required

Delivery IDs.

Example: [11,19]

Get delivery statuses › Responses

OK

succeed
​boolean

Response status.

Example: true
​DeliveryStatus[]

Array of delivery status objects.


Get delivery size

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

Returns the estimated size of the delivery's message in bytes, without headers: the length of the HTML, plain text, subject and SMS text, plus the size of its images or attachments. Returns 0 if the delivery does not exist or is not yours.

Get delivery size › Request Body

delivery_id
​DeliveryId · required

Delivery ID.

Example: 10
inline_only
​integer

Which files are added to the size: 1 adds inline images and attachments, 0 adds all images but no attachments. Defaults to 1.

Get delivery size › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​DeliverySize

Delivery size in bytes.

Example: 35490

Check sending block

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

Returns whether sending is temporarily blocked for your account. While the block is on, requests that send mail fail with a sending blocked error.

Check sending block › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​boolean

Returns true if sending is temporarily blocked for your account.

Example: false

Resend delivery to mailing list

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

Sends the content of an existing delivery again as a new delivery. The mail and its content blocks are copied, so the original delivery does not change. With list_id, the new delivery is sent to that mailing list at the scheduled time and keeps the open and link tracking of the original. Without list_id, the new delivery is created without contacts and is not sent.

Resend delivery to mailing list › Request Body

​required

ID of the delivery to send again, or the name of its mail, as returned by getMailName.

Example: 10
list_id
​ListId

Mailing list ID.

Example: 60
​object

Delivery settings.

Resend delivery to mailing list › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​integer

ID of the newly created delivery.

Example: 2010

Cancel delivery

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

Marks a delivery as cancelled so that it is not sent. Cancel it before sending starts: messages that are already sent are not affected. To cancel the delivery together with its related deliveries, use cancelDeliveryRelated. Returns an error if the delivery does not exist or is not yours.

Cancel delivery › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10

Cancel delivery › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​integer

Returns 1 on success.

Example: 1

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

Cancels a delivery and all its related deliveries, as returned by getRelatedDeliveries. Deliveries that are already cancelled are skipped. Each delivery is cancelled as with cancelDelivery, so messages that are already sent are not affected.

id
​DeliveryId · required

Delivery ID.

Example: 10

OK

succeed
​boolean

Response status.

Example: true
result
​integer

Returns 1 on success.

Example: 1

Hide delivery

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

Hides a delivery from the report view. Hidden deliveries are no longer returned by getDelivery, getDeliveries or getDeliveriesRange. Hiding does not cancel the delivery: a scheduled delivery is still sent unless you cancel it with cancelDelivery.

Hide delivery › Request Body

delivery_id
​integer · required

ID of the delivery to hide from reports.

Example: 10

Hide delivery › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​integer

Returns 1 on success.

Example: 1