rest-api
rest-api copied to clipboard
How can target a LIST when add a new subscriber via php , How can I add attributes to the JSON?
Dear All Am testing the Rest API, and it works great. The problem is how can I target a specific List. and how can I add the attributes to the json?
try {
$subscriberRequest = $client->request('POST', $base_uri . '/subscribers',
[
'headers' => [
'Authorization' => 'Basic ' . $credentials,
'Content-Type' => 'application/json',
],
'json' => [
'email' => '[email protected]',
'confirmed' => true,
'blacklisted' => false,
'html_email' => true,
'disabled' => false,
],
]
);
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
}
I can found nothing in the API Doc https://github.com/phpList/rest-api/blob/master/docs/Api/RestApi.apib