How to create a recipient group
JSON Request Example:
{
  "title":"My Recipients"
}
 
 HTTP request example:
curl -X POST https://api.msndr.net/v1/email/lists \
     -H 'Content-Type: application/json'     \
     -H 'Authorization: Bearer $API_TOKEN'   \
     -d '...JSON...'
Uses POST method and /email/lists
Successful response
{
  "id":1,
  "title":"My Recipients"
}
Let's look at the parameters of the request. Below is information about these parameters: name, description and whether this parameter is required or not
| 
 Parameter  | 
 Description  | 
 Requiered  | 
| 
 title  | 
 The title of the recipient group. Must be unique  | 
 yes  | 
Let's look at the name and description of the server response json attributes:
| 
 Attribute  | 
 Description  | 
| 
 id  | 
 identification of the created group  | 
| 
 title  | 
 group name  | 
Getting a list of groups
HTTP request:
curl -X GET https://api.msndr.net/v1/email/lists \
     -H 'Content-Type: application/json'    \
     -H 'Authorization: Bearer $API_TOKEN'
Uses GET method and the /email/lists 
This method supports paginated output.
If the request is successful you will get the following json response:
{
  "total_count":3,
  "total_pages":1,
  "page_number":1,
  "page_size":25,
  "collection":[
    {
      "id":1,
      "title":"My Recipients"
    },
    {
      "id":2,
      "title":"My Recipients #2"
    },
    {
      "id":3,
      "title":"My Recipients #3"
    }
  ]
}
The response contains a collection of recipient groups. Each element has the following parameters:
| 
 Attribute  | 
 Description  | 
| 
 id  | 
 identification of the group  | 
| 
 title  | 
 name of the group  | 
Getting information about the group
http request:
curl -X GET https://api.msndr.net/v1/email/lists/1 \
     -H 'Content-Type: application/json'      \
     -H 'Authorization: Bearer $API_TOKEN'
Uses GET method and the /email/lists/:id 
where :id is the group identifier for the information request.
successful response
{
  "id":1,
  "title":"My Recipients"
}
Here is a description of the attributes in the server's json response:
| 
 Attribute  | 
 Description  | 
| 
 id  | 
 identifier of the group  | 
| 
 title  | 
 name of the group  | 
Deleting a group
HTTP request:
curl -X DELETE https://api.msndr.net/v1/email/lists/1 \
     -H 'Content-Type: application/json'         \
     -H 'Authorization: Bearer $API_TOKEN'
 
Uses DELETE method and the /email/lists/:id
where :id is the group identifier for the information request
If the deletion is successful, the server will return an empty response with status 204.
Editing a group
Example of json data for the request:
{
  "title":"New Title"
}
 
HTTP request:
curl -X PATCH https://api.msndr.net/v1/email/lists/1 \
     -H 'Content-Type: application/json'        \
     -H 'Authorization: Bearer $API_TOKEN'
     -d '...JSON...'
Uses PATCH method and the /email/lists/:id
where :id is the group identifier for the information request
Successful response
{
  "id":1,
  "title":"New Title"
}
 
Below is the table with description of HTTP request parameters::
| 
 Parameter  | 
 Description  | 
 Required  | 
| 
 title  | 
 The name of the recipient group. Must be unique  | 
 yes  | 
Below is a table describing the attributes of the json response from the server:
| 
 Attribute  | 
 Description  | 
| 
 id  | 
 Identifier of the created group  | 
| 
 title  | 
 name of the group  |