Managing recipient group parameters

Creating a group parameter

Example of json data for HTTP request:

{
  "title":"Age",
  "kind": "numeric"
}


 

Example of http request:

curl -X POST https://api.msndr.net/v1/email/lists/1/parameters \
     -H 'Content-Type: application/json'                  \
     -H 'Authorization: Bearer $API_TOKEN'                \
     -d '...JSON...'


 

Here the POST method and the link /email/lists/:id/parameters is used

 

If the request is successful, you will receive the following response:

{
  "id":11,
  "title":"Age",
  "kind":"numeric",
  "list_id":15
}


 
The table below describes the parameters of this request:

Parameter    

Description

Mandatory  

title

 

yes

kind

Possible values:
string
numeric
date
boolean
geo
Default value: string

 

 

The following is a description of the attributes in the json response:

Attribute

Description

id

identifier

title

name

kind

type

 

Getting the list of group parameters
 
Example of HTTP request:

curl -X GET https://api.msndr.net/v1/email/lists/1/parameters \
     -H 'Content-Type: application/json'                 \
     -H 'Authorization: Bearer $API_TOKEN'
 

 

The GET method is used here and it supports paginated output

 

The link used is email/lists/:id/parameters

Where id is the identifier of the group for which we want to get the list of parameters

Example of response if request is successful:

{
  "total_count":2,
  "total_pages":1,
  "page_number":1,
  "page_size":25,
  "collection":[
    {
      "id":1,
      "title":"Name",
      "kind":"string",
      "list_id":1
    },
    {
      "id":2,
      "title":"Age",
      "kind":"numeric",
      "list_id":1
    }
  ]
}


The server response is a collection of parameters for this group. Each element of the collection contains attributes described in the table below:

Attribute

Description

id

identifier

title

name

kind

type

Изменение параметра группы

 

Example of json data for HTTP request:

{
  "title":"Age",
  "kind": "numeric"
}


 

Example of HTTP request:

curl -X PATCH https://api.msndr.net/v1/email/lists/11/parameters/15 \
     -H 'Content-Type: application/json'                       \
     -H 'Authorization: Bearer $API_TOKEN'                     \
     -d '...JSON...'


 

Here we use the PATCH method and the /email/lists/:list-id/parameters/:id link

where :list-id is the unique identifier of the group, :id is the identifier of the group parameter

Example of response in case of successful HTTP request:

{
  "id":11,
  "title":"Age",
  "kind":"numeric",
  "list_id":15
}


 

Here are some explanations of the request attributes in the table below:

Parameter  

Description

Mandatory

title

   

kind

Possible values:
string
numeric
date
boolean
geo
If the parameter type is changed, the corresponding values will be reset to zero

 

 

json server response to HTTP request:

Attribite  

Description

id

identifier

title

name

kind

type

 

Deleting a parameter from a group

 

Example of HTTP request:

curl -X DELETE https://api.msndr.net/v1/email/lists/11/parameters/15 \
     -H 'Content-Type: application/json'                        \
     -H 'Authorization: Bearer $API_TOKEN'
 

The DELETE method and the /email/lists/:list-id/parameters/:id link are used

where :list-id is a unique group identifier, :id is a parameter identifier


 
 

Have you tried Cloud4U cloud services? Not yet?

Go to the Main Website

Try for free

  • 57 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 не является...

Powered by WHMCompleteSolution