Creating a recipient in a group
Exammple of json data for an HTTP request:
{ "email":"alice@example.org", "unconfirmed": true, "values":[ { "parameter_id":"1", "value":"Alice" }, { "parameter_id":"2", "value":"22" } ] }
Example of an HTTP request:
curl -X POST https://api.msndr.net/v1/email/lists/1/recipients \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN' \ -d '...JSON...'
Uses POST and /email/lists/:id/recipients
where id is the recipient group identifier
Successful response:
{ "id":1, "email":"alice@example.org", "confirmed":false, "list_id":1, "status": "active", "values":[ { "value":"Alice", "kind":"string", "parameter_id":1 }, { "value":22.0, "kind":"numeric", "parameter_id":2 } ] }
The request parameters:
Parameter | Description | Required |
Recipient email address | yes | |
unconfirmed | Create an unconfirmed recipient. Any value must be set, for example, true, t, or 1. By default, a confirmed recipient is created. | no |
values | Array of values for parameters | no |
The parameters of the elements of the values and their description:
Parameter | Description | Required |
parameter_id | recipient group parameter id | yes |
value | yes |
The description of the attributes of the json response from the server:
Attribute | Description |
id | identifier |
Email adress of the recipient | |
confirmed | Recipient confirmed or not |
status | Recipient status. Possible values: active, incorrect, unconfirmed, unsubscribed |
values | Array of values |
Explanation of the attributes of the elements of the values array in the json response of the server:
Parameter | Description |
parameter_id | Recipient group parameter ID |
kind | type of parameter |
value | parameter value |
Getting information about a recipient in a group
HTTP request example:
curl -X GET https://api.msndr.net/v1/email/lists/1/recipients/2 \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN'
Uses GET and /email/lists/:list_id/recipients/:id
where list_id is the recipient group identifier, and id is the recipient's id
Sucessful response:
{ "id":2, "email":"alice@example.org", "confirmed":false, "list_id":1, "status": "active", "values":[ { "value":"Alice", "kind":"string", "parameter_id":1 }, { "value":22.0, "kind":"numeric", "parameter_id":2 } ] }
The table below explains the HTTP request parameters:
Parameter | Description | Required |
list_id | group ID | yes |
id | recipient ID | yes |
server response json attributes:
Attribute | Description |
id | Recipient ID |
Email address of the recipient | |
confirmed | Recipient confirmed or not |
status | Recipient status. Possible values: active, incorrect, unconfirmed, unsubscribed |
values | Array of values |
Explanation of the attributes of the elements of the values array in the json response of the server:
Parameter | Description |
parameter_id | Recipient group parameter ID |
kind | Parameter type |
value | Value |
Editing recipient parameters in a group:
Example of json data for HTTP request:
{ "email":"alice@example.org", "values":[ { "parameter_id":"1", "value":"Alice" }, { "parameter_id":"2", "destroy":"true" } ] }
Example of an HTTP request:
curl -X PATCH https://api.msndr.net/v1/email/lists/1/recipients/1 \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN' \ -d '...JSON...'
Uses PATCH and /email/lists/:list_id/recipients/:id
where list_id is the recipient group identifier, id is the recipient identifier
Successful response:
{ "id":1, "email":"alice@example.org", "confirmed":true, "status": "active", "list_id":1, "values":[ { "value":"Alice", "kind":"string", "parameter_id":1 } ] }
Request parameters:
Parameter | Description | Required |
Email address of the recipient | no | |
values | Array of values for parameters |
Parameters of an element of the values array in an HTTP request
Parameter | Description | Required |
parameter_id | Recipient group parameter ID | Yes |
value | Cannot be used together with the destroy parameter | No |
destroy | It is used to delete a specific value. To delete a value, you must specify any value such as "true", "t", or "1". It cannot be used at the same time as the value parameter. |
attributes in the json response from the server:
Attribute | Description |
id | identifier |
adress | |
confirmed | Recipient confirmed or not |
status | Recipient status. Possible values: active, incorrect, unconfirmed, unsubscribed |
values | Array of values |
parameters of elements of the values array in the json response of the server:
Parameter | Description |
parameter_id | Recipient group parameter ID |
kind | Parameter type |
value | Parameter value |
Getting the list of recipients in a group
HTTP request example:
curl -X GET https://api.msndr.net/v1/email/lists/1/recipients \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN'
Uses GET and /email/lists/:id/recipients
Where id is the id of the recipient group
This method supports paginated output. The maximum page size is 1000
Example of json response:
{ "total_count":2, "total_pages":1, "page_number":1, "page_size":25, "collection":[ { "id":1, "email":"alice@example.org", "confirmed":true, "status": "active", "list_id":1, "values":[ { "value":"Alice", "kind":"string", "parameter_id":9 }, { "value":22.0, "kind":"numeric", "parameter_id":10 } ] }, { "id":2, "email":"bob@example.org", "confirmed":true, "status": "active", "list_id":1, "values":[ ] } ] }
Parameters of elements of recipient array (collection) of json response from server :
Attribute | Description |
id | Recipient identifier |
Email address of the recipient | |
confirmed | Recipient confirmed or not |
status | Recipient status. Possible values: active, incorrect, unconfirmed, unsubscribed |
values | Array of values |
The parameters of the elements in the values array for each recipient are:
Parameter | Description |
parameter_id | Recipient group parameter ID |
kind | Parameter type |
value | Parameter value |
Deleting a recipient in a group
HTTP request example:
curl -X DELETE https://api.msndr.net/v1/email/lists/1/recipients/1 \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN'
DELETE method and the /email/lists/:list_id/recipients/:id link are used
Where list_id is the recipient group id, id is the recipient id.
Importing a large number of recipients into a recipient group
Example of json data for an HTTP request:
{ "recipients":[ { "email":"alice@example.org", "values":[ { "parameter_id":"1", "value":"Alice" }, { "parameter_id":"2", "value":"22" } ] }, { "email":"bob@example.org", "values":[ { "parameter_id":"1", "value":"Bob" }, { "parameter_id":"2", "value":"11" } ] } ] }
HTTP request example:
curl -X POST https://api.msndr.net/v1/email/lists/1/recipients/imports \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN' \ -d '...JSON...'
Uses POST and /email/lists/:id/recipients/imports
Where id is the id of the recipient group
Example of json response:
{ "id":7, "status":"queued" }
The parameters in the HTTP request json data
Parameter | Description | Required |
recipients | Array of recipients. Maximum size 10000 | yes |
run_triggers | Run the linked triggers. Any value such as true, t or 1 must be set. | no |
Description of the parameters of the recipient array elements (recipients) to be imported:
Parameter | Description | Required |
Email address of the recipient | yes | |
values | Array of values for parameters |
Description of the parameters of the elements of the values array for each recipient:
Parameter | Description | Required |
parameter_id | Recipient group parameter ID | yes |
value | yes |
Server response json parameters:
Parameter | Description |
id | Import identifier. Can be used later to get information about the import progress |
status | Import status of the recipients |
Recipient search by email address
HTTP request:
curl -X GET https://api.msndr.net/v1/email/recipients/search?email=foo@bar.com \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer $API_TOKEN'
The GET method and the link /email/recipients/search is used
Successful response:
{ "total_count": 2, "total_pages": 1, "page_number": 1, "page_size": 25, "collection": [ { "email": "foo@bar.com", "recipients": [ { "list_id": 1, "list_title": "List #1", "recipient_id": 1 }, { "list_id": 2, "list_title": "List #2", "recipient_id": 2 } ] } ], "query": "test" }
HTTP request parameters
Parameter | Description | Required |
Email address of the recipient | yes |
Parameters of the items in the recipients array in the server's json response:
Attribute | Description |
Email address of the recipient | |
recipients | An array containing information about the lists that contain the searched recipient |