GET

mailing-lists/{id}

Get information about a specific list from "Contacts" list of the API-key holder account

Request example:

  • mailing-lists/47

Response example:

  • Status code: 200 OK

{
"success": true,
"data": [
{
"id": 47,
"organization_id": 8,
"name": "This is a mailing list",
"detail": "This is the description of this list",
"created_at": "2020-11-27 09:48:44",
"updated_at": "2020-11-27 09:48:44",
"used_default_columns": [
"email"
],
"used_custom_columns": [],
"entry_number": 2,
"upload_in_progress": false,
"subscribed_entry_number": 2,
"custom_fields": [],
"unsubscribed": 0,
"bounced": 0,
"is_attached_to_campaign": false,
"email_sent": 0,
"opened": 0,
"replied": 0,
"clicked": 0
}
]
}
  • Status code: 401 Unauthorized

{
"success": false,
"message": "This mailing list does not belong to your organization",
"status_code": 401
}

Code example:

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '.../mailing-lists/47', // 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 API key
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Did this answer your question?