Delete Monitor - API Reference
Deletes an active monitor. This action stops the API from monitoring new events for the target user profile and halts all future charges associated with this monitor.
DELETE https://api.socialdata.tools/monitors/{monitor_id}
Headers
Authorization string required
Authorization Bearer header containing your SocialData API key
Example: Bearer YOUR_API_KEY
Path Parameters
monitor_id string required
Target monitor ID
Example: 01jeg76qa91b095gttamsbwa6q
Code Examples
curl -X DELETE "https://api.socialdata.tools/monitors/01jeg76qa91b095gttamsbwa6q" -H 'Authorization: Bearer YOUR_API_KEY' -H 'Accept: application/json'
const monitorId = '01jeg76qa91b095gttamsbwa6q';const API_KEY = 'YOUR_API_KEY_HERE';
fetch(`https://api.socialdata.tools/monitors/${monitorId}`, { method: 'DELETE', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Accept': 'application/json' }}).then(response => response.json()).then(response => console.log(response)).catch(err => console.error(err));
import requests
monitor_id = '01jeg76qa91b095gttamsbwa6q'API_KEY = 'YOUR_API_KEY_HERE'
url = f'https://api.socialdata.tools/monitors/{monitor_id}'
headers = { 'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'}
response = requests.delete(url, headers=headers)
if response.status_code == 200: data = response.json() print(data)else: print(f"Error: {response.status_code}") print(response.text)
$monitor_id = '01jeg76qa91b095gttamsbwa6q';$API_KEY = 'YOUR_API_KEY_HERE';
$url = "https://api.socialdata.tools/monitors/{$monitor_id}";
$ch = curl_init();
curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer $API_KEY", "Accept: application/json" ]]);
$response = curl_exec($ch);$data = json_decode($response, true);print_r($data);
curl_close($ch);
Example Responses
{ "status": "success"}
{ "status": "error", "message": "Not found"}
Response Codes
- 200 OK - request succeeded
- 404 Not Found - requested monitor does not exist