List groups


URL_API_USgroups/list

You can use the offset and limit parameters for pagination as seen in the example request.

Request
$ curl URL_API_USgroups/list?api_key={API_KEY}&offset=0&limit=100
Toggle Response
{
   "success":true,
   "data":[
    {
        "id":"398",
        "account_id":"1",
        "name":"Test Group",
        "created":"2019-09-25 11:57:35",
        "recipients":"100",
        "valid":"98",
        "international":"0",
        "skipped":"0",
        "status":"ready",
        "import_progress":"0",
        "is_seeds":"0"
    },
    {
        "id":"390",
        "account_id":"1",
        "name":"My Data",
        "created":"2019-09-23 10:50:48",
        "recipients":"6000",
        "valid":"5872",
        "international":"0",
        "skipped":"0",
        "status":"ready",
        "import_progress":"0",
        "is_seeds":"0"
    }
   ]
}

Create a new group


URL_API_USgroups/new

Parameters

name string [required] Name of the new group to be created.
Request
$ curl URL_API_USgroups/new?api_key={API_KEY} \
-d "name=My Group"
Response
{
    "success":true,
    "data":"39"
}

Add recipients to a group


URL_API_USgroups/add/:group_id

Parameters

recipients string [required] Comma separated recipient id's.
Request
$ curl URL_API_USgroups/add/1234?api_key={API_KEY} \
-d "recipients=45112,45113"
Response
{
    "success":true,
    "data":true
}

Remove recipients from a group

Note this only removes the recipient from the group and will not completely delete the recipient. You must use the recipients endpoint to delete the record completely.
URL_API_USgroups/remove/:group_id

Parameters

recipients string [required] Comma separated recipient id's.
Request
$ curl URL_API_USgroups/remove/1234?api_key={API_KEY} \
-d "recipients=45112,45113"
Response
{
    "success":true,
    "data":true
}

Purge a group


URL_API_USgroups/purge

Parameters

id int [required] The id of the group to delete
delete_recipients bool [optional] True or false. Delete all recipients in this group if true.

WARNING: If true this will completely delete the recipients so they will not exist in any other groups if the recipient was in multiple groups.

Defaults to false. Which will not delete recipients.
Request
$ curl URL_API_USgroups/purge?api_key={API_KEY} \
-d "id=123"
Response
{
   "success": true,
   "data": true
}

Delete a group


URL_API_USgroups/delete

Parameters

id int [required] The id of the group to delete
delete_recipients bool [optional] True or false. Delete all recipients in this group if true.

WARNING: If true this will completely delete the recipients so they will not exist in any other groups if the recipient was in multiple groups.

Defaults to false. Which will not delete recipients.
Request
$ curl URL_API_USgroups/delete?api_key={API_KEY} \
-d "id=123"
Response
{
   "success":true,
   "data":{}
}