DELETE

mailing-lists/{id}

Delete a specific contact list

Request example:

  • mailing-lists/140

Response example:

  • Status code: 200 OK

{
"success": true,
"message": "Mailing list deleted successfully"
}
  • 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/140', //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 => 'DELETE',
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?