Delete Monitor

Last modified on August 16, 2021

To delete a monitor, send a DELETE request to /monitors/{id}, where {id} is the monitor ID. You can learn the monitor IDs by using the GET /monitors operation.

Request URL



The request must include the Authorization header containing a user’s access token:

Authorization: Bearer ACCESS_TOKEN

See Authentication for more information.

Response body

On success, the operation returns HTTP status 204 without a request body.

Error responses have a non-204 status code and include the errors list:

  "errors": [
      "code": 404,
      "message": "Record not found"

Try it out

Click here to test this operation in AlertSite’s interactive API console.

Code examples

Delete the monitor with ID 123456:


curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN"


# Python 3.5+
import requests  # Requests library
import json

baseUrl = ''
username = ''  # Replace with your AlertSite login email
password = 'pa55w0rd'          # Replace with your AlertSite password
monitor_id = 123456

# Log in
payload = {'username': username, 'password': password}
r = + '/access-tokens', data=json.dumps(payload), headers={'Content-Type': 'application/json'})
token = r.json()['access_token']

# Delete the monitor
r = requests.delete(baseUrl + '/monitors/{}'.format(monitor_id), headers={'Authorization': 'Bearer ' + token})
if r.ok:
  print('Monitor {} has been deleted.'.format(monitor_id))
  print('Could not delete monitor {}. The following error(s) occurred:'.format(monitor_id), *r.json()['errors'], sep='\n')

See Also

Monitor Operations
Get Monitor
Get Monitors

Highlight search results