Delete Custom Property

Last modified on August 16, 2021

To delete a custom property, send a DELETE request to /properties/{id}, where {id} is the property ID. You can get property IDs by using GET /properties.

Deleting a property deletes it from all monitors.

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

If successful, 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 property with ID 123:

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


Delete the property named Environment:


# Python 3.5+
import requests  # Requests library
import json

baseUrl = ''
username = ''  # Replace with your AlertSite login email
password = 'pa55w0rd'          # Replace with your AlertSite password
property_name = 'Environment'

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

# Get property ID by property name
r = requests.get(baseUrl + '/properties?select=id,name', headers=headers)
for prop in r.json()['results']:
  if prop['name'] == property_name:
    property_id = prop['id']
  print('Property named "{}" was not found.'.format(property_name))

# Delete the property
r = requests.delete(baseUrl + '/properties/{}'.format(property_id), headers=headers)
if r.ok:
  print('Property # {} has been deleted.'.format(property_id))
  print('Could not delete property # {}. The following error(s) occurred:'.format(property_id), *r.json()['errors'], sep='\n')

See Also

Custom Properties Operations

Highlight search results