Lista list kontaktów
curl --request GET \
--url https://api.example.com/api/v1/listsimport requests
url = "https://api.example.com/api/v1/lists"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/lists', 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://api.example.com/api/v1/lists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/lists"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/lists")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"lists": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"is_active": true,
"contact_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"page": 123,
"size": 123,
"totalElements": 123,
"totalPages": 123
}
}Listy kontaktów
Lista list kontaktów
Pobierz wszystkie listy kontaktów z paginacją
GET
/
api
/
v1
/
lists
Lista list kontaktów
curl --request GET \
--url https://api.example.com/api/v1/listsimport requests
url = "https://api.example.com/api/v1/lists"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/lists', 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://api.example.com/api/v1/lists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/lists"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/lists")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"lists": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"is_active": true,
"contact_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"page": 123,
"size": 123,
"totalElements": 123,
"totalPages": 123
}
}Parametry zapytania
integer
default:"0"
Numer strony dla paginacji (indeksowany od 0)
integer
default:"20"
Liczba list na stronę
Response
boolean
Indicates if the request was successful
object
Paginated lists data
Show Response structure
Show Response structure
array
integer
Current page number (0-indexed)
integer
Page size
integer
Total number of lists
integer
Total number of pages
Example request
curl https://api.mailist.com/api/v1/lists?page=0&size=20 \
-H "X-API-Key: YOUR_API_KEY"
Example response
{
"success": true,
"data": {
"lists": [
{
"id": 123,
"name": "Newsletter Subscribers",
"description": "Main newsletter subscription list",
"is_active": true,
"contact_count": 1250,
"created_at": "2024-01-15T10:30:00",
"updated_at": "2024-12-23T14:20:00"
},
{
"id": 124,
"name": "VIP Customers",
"description": "Premium tier customers",
"is_active": true,
"contact_count": 87,
"created_at": "2024-03-20T09:15:00",
"updated_at": "2024-12-20T11:45:00"
}
],
"page": 0,
"size": 20,
"totalElements": 8,
"totalPages": 1
}
}
Uwagi
- Listy są sortowane według daty utworzenia
- Ten endpoint wymaga uprawnienia
lists.readdla klucza API - Nieaktywne listy (is_active: false) nadal są zwracane w wynikach
