List Segment
curl --request POST \
--url https://cloudapi.mailercloud.com/v1/segment/search \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 10,
"page": 1
}
'import requests
url = "https://cloudapi.mailercloud.com/v1/segment/search"
payload = {
"limit": 10,
"page": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 10, page: 1})
};
fetch('https://cloudapi.mailercloud.com/v1/segment/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloudapi.mailercloud.com/v1/segment/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 10,
'page' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloudapi.mailercloud.com/v1/segment/search"
payload := strings.NewReader("{\n \"limit\": 10,\n \"page\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"count": 2,
"data": [
{
"active_count": 8690337,
"id": "KyGa",
"list": "Default List,Sending list,sending list 2,Auto Test 3,Auto Test 0,Auto Test 1,Auto list New,List bounce,Multy domain,lowww,List10lac1,LIST10lac2,List10lac3,List10lac4,List10Lac6,Fineecho copy paste,List auto test -1,List auto test -2,Vinmail Open,list vinmail,Tb live test-Multydomain,Api test",
"name": "Sending list-1"
},
{
"active_count": 8408779,
"id": "Kxwf",
"list": "Default List,Sending list,sending list 2,Auto Test 3,Auto Test 0,Auto Test 1,Auto list New,List bounce,Multy domain,lowww,List10lac1,LIST10lac2,List10lac3,List10lac4,List10Lac6,Fineecho copy paste,List auto test -1,List auto test -2,Vinmail Open",
"name": "ryth"
}
]
}{
"error_code": 123,
"message": "<string>"
}List Segment
List all your created segments.
POST
/
segment
/
search
List Segment
curl --request POST \
--url https://cloudapi.mailercloud.com/v1/segment/search \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 10,
"page": 1
}
'import requests
url = "https://cloudapi.mailercloud.com/v1/segment/search"
payload = {
"limit": 10,
"page": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 10, page: 1})
};
fetch('https://cloudapi.mailercloud.com/v1/segment/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloudapi.mailercloud.com/v1/segment/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 10,
'page' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloudapi.mailercloud.com/v1/segment/search"
payload := strings.NewReader("{\n \"limit\": 10,\n \"page\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"count": 2,
"data": [
{
"active_count": 8690337,
"id": "KyGa",
"list": "Default List,Sending list,sending list 2,Auto Test 3,Auto Test 0,Auto Test 1,Auto list New,List bounce,Multy domain,lowww,List10lac1,LIST10lac2,List10lac3,List10lac4,List10Lac6,Fineecho copy paste,List auto test -1,List auto test -2,Vinmail Open,list vinmail,Tb live test-Multydomain,Api test",
"name": "Sending list-1"
},
{
"active_count": 8408779,
"id": "Kxwf",
"list": "Default List,Sending list,sending list 2,Auto Test 3,Auto Test 0,Auto Test 1,Auto list New,List bounce,Multy domain,lowww,List10lac1,LIST10lac2,List10lac3,List10lac4,List10Lac6,Fineecho copy paste,List auto test -1,List auto test -2,Vinmail Open",
"name": "ryth"
}
]
}{
"error_code": 123,
"message": "<string>"
}Authorizations
Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.
Headers
application/json
Body
application/json
Maximum number of elements to return.
Maximum: 100 Minimum: 10
You can retrieve a subset of records starting from the page value you have specified. You can add a limit, which will determine the number of records you can retrieve on a single page.
Starts From: 1
Filter segment list by name , giving name as search keyword
Minimum string length:
1Sort segment list data based on the following field.
Available sort fields: name,active_count
Minimum string length:
1Sorting order for sort field
Available sort orders
asc, ASC, desc, DESC
Minimum string length:
1