Email Service API - General Information

Through the Email Newsletter Service's Application Programming Interface (API), you can send newsletters, individual email messages, manage recipient lists, get newsletter statistics, and more.

Basic URL for sending requests:

https://api.msndr.net/v1

 

Alternative URL for sending requests, to be used if the main URL is blocked:

 

https://api-reserve.msndr.net/v1

 

Authentication is done using a token.

This token must be sent with each new HTTP request. It is passed with the parameter:

Authorization: Bearer $API_TOKEN

 

Your token is stored in your personal account. Do not share it with others

Data exchange with the server is done in json format. Each request must include a header:

Content-Type: application/json

Sometimes it is necessary to obtain a list of data called collections. Some requests allow you to get a list of data by page, with a certain number of rows per page. The page number is specified in the query parameter:

pagenumber

The page size (number of records) is specified in the parameter:

pagesize

Example query:

curl -X GET https://api.msndr.net/v1/email/lists?page_number=2&page_size=3 \

     -H 'Content-Type: application/json'         \

     -H 'Authorization: Bearer $API_TOKEN'

 

If you exceed the maximum size of the requested page, you will get an error

 

 {   

         "errors": [     

           {       

               "code": 412,       

               "detail": "Page size is too big. Max value is 100"     

           }   

         ] 

  }

 

The default value of page_size, if you have not set it, is 100.

An example of a response to a request with a list of data (collection). The response is a structure:

{   

       "total_count":23,   

       "total_pages":8,   

       "page_number":2,   

       "page_size":3,   

       "collection":[     

                            {       

                               "id":1,       

                               "title":"My Recipients"     

                            },     

                            {       

                               "id":2,       

                               "title":"My Recipients #2"     

                           },     

                           {       

                              "id":3,       

                              "title":"My Recipients #3"     

                           }   

            ]

      }

Where total_count is the total number of items, total_pages is the total number of pages, page_number is the page number, page_size is the page size, collection is an array of returned data.

Query responses contain codes. These can be used to determine the status of the request completion.

 

Below are the codes and their description

Code

Description

2xx

The request is successfully completed

400

Invalid parameters

401

Authentication failed

402

Insufficient funds

404

Resource not found

415

Unsupported data type

422

Resource cannot be processed

500

Unknown error

 

 

Have you tried Cloud4U cloud services? Not yet?

Go to the Main Website

Try for free

  • 54 Users Found This Useful
Was this answer helpful?

Related Articles

Получение текущего баланса

Чтобы получить информацию по вашему балансу нужно выполнить следующий HTTP запрос: curl -X GET...

Управление организациями

Создание организации Пример json данных для HTTP запроса: { "name":"My Organization",...

Управление рассылками

Создание рассылки  Пример json данных для HTTP запроса: { "from_email":"hello@world.com",...

Механизм Webhooks

Механизм Webhooks позволяет получать POST запросы на указанный вами URL в случае возникновения...

Отправка сообщений по SMTP

Базовый URL smtp.msndr.net Порт 25 или 587 Использование шифрования SSL\TLS не является...