Overview
You can use this request to delete a specific list.
The Method
API | - | Method |
---|---|---|
REST | DELETE | https://[Your URL]/api/2.0/lists/id |
XML-RPC | Call | lists.DeleteList |
Your URL is the address of your install.
Your method must be structured as follows:
DeleteList(integer $id) : boolean
Parameters
Property | Type | Description | Required |
---|---|---|---|
$id | integer | The ID of the list you need to delete. | yes |
Responses
Large lists are deleted asynchronously, the API will return a status code of 202 (Accepted) and a false result. Smaller lists are deleted immediately and will return a status code of 204 (No Content) on success.
Type | Description |
---|---|
boolean | Whether or not the list was successfully deleted. |
Code Samples
PHP (using REST API):
$url = '(Your URL)/api/2.0/lists/list_id'; $method = 'DELETE'; $cSession = curl_init(); $headers = array(); $auth = base64_encode($username . ':' . $apikey); $headers[] = 'Authorization: Basic ' . $auth; curl_setopt($cSession, CURLOPT_URL, $url); curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true); curl_setopt($cSession, CURLOPT_HEADER, false); curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method)); curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($cSession); curl_close($cSession);