GET /wp-json/wpsms/v1/newsletter
Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://site.com/wp-json/wpsms/v1/subscribers',
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(
'Authorization: Basic ***',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response:
{
"message": [
{
"ID": "46",
"date": "2021-08-14 12:12:13",
"name": "Claire F. McCullough",
"mobile": "0911111111",
"status": "1",
"activate_key": null,
"group_ID": "0"
},
{
"ID": "47",
"date": "2021-08-19 12:06:01",
"name": "Deborah B. Villarreal",
"mobile": "0911111112",
"status": "1",
"activate_key": null,
"group_ID": "2"
}
],
"error": []
}