Get "Contacts" lists

GET

mailing-lists

Get "Contacts" lists.

Response example:

  • Status code: 200 OK

{
"success": true,
"data": [
{
"id": 47,
"organization_id": 8,
"name": "Renamed list",
"detail": null,
"created_at": "2020-11-27 09:48:44",
"updated_at": "2021-01-07 11:02:04",
"used_default_columns": [
"email"
],
"used_custom_columns": [],
"entry_number": 3,
"upload_in_progress": false,
"subscribed_entry_number": 3,
"custom_fields": [],
"unsubscribed": 0,
"bounced": 0,
"is_attached_to_campaign": false,
"email_sent": 0,
"opened": 0,
"replied": 0,
"clicked": 0
},
{
"id": 48,
"organization_id": 8,
"name": "Another list",
"detail": null,
"created_at": "2020-11-27 10:06:31",
"updated_at": "2020-11-27 10:06:31",
"used_default_columns": [
"email"
],
"used_custom_columns": [],
"entry_number": 1,
"upload_in_progress": false,
"subscribed_entry_number": 1,
"custom_fields": [],
"unsubscribed": 0,
"bounced": 0,
"is_attached_to_campaign": false,
"email_sent": 0,
"opened": 0,
"replied": 0,
"clicked": 0
}
]
}

Code example:

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '.../mailing-lists', //replace ... with the whole API URL
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: YOUR-API-KEY' //replace with your generated api key
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Did this answer your question?