Create a DejaClick Monitor

Last modified on May 22, 2024

To add a new DéjàClick monitor, send a POST request to /monitors/dejaclick with a JSON body containing the monitor configuration.

Request URL



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

Authorization: Bearer ACCESS_TOKEN

See Authentication for more information.

The authenticating user must have permissions to create monitors.

Request body

The request body is a JSON object containing the monitor configuration parameters. The required data fields for a website monitor are:

  • billing_plancode

  • name

  • step_timeout

  • transaction_steps

  • script or url

For the full list and description of available fields, see DéjàClick monitor fields.

Parameters that are not specified in the request body will take the values specified in AlertSite defaults and your account defaults. For example, if you do not specify locations for the monitor, it will use your account's default monitoring locations.

Below is the minimal example of DéjàClick monitor parameters:

  "billing_plancode": "UBM - A/A",
  "name": "SmartStore",
  "step_timeout": 30,
  "transaction_steps": 1,
  "url": ""

Response body

On success, the operation returns the ID of the created monitor.

  "id": "123456"

Error responses have a non-200 status code and contain the errors list, such as:

  "errors": [
      "code": 400,
      "message": "invalid_request - User authentication failed."

Try it out

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

Code examples

This code creates a 15-minute monitor for

cURL (Windows)

curl -X POST
  -H "Authorization: Bearer ACCESS_TOKEN"
  -H "Content-Type: application/json"
  -d '{\"billing_plancode\":\"UBM - A/A\", \"name\":\"SmartStore\", \"url\":\"\", \"interval\":15, \"step_timeout\":30, \"transaction_steps\":3}'

Note: New lines are added for readability.
The actual command should be one continuous line.

cURL (bash)

curl -X POST \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-type: application/json" \
  -d '{"billing_plancode":"UBM - A/A", "name":"SmartStore", "url":"", "interval":15, "step_timeout":30, "transaction_steps":3}'


import requests # Requests library
import json

baseUrl = ''
username = '[email protected]'  # Replace with your AlertSite login email
password = 'pa55w0rd'          # Replace with your AlertSite password

monitor_params = {
  'billing_plancode': 'UBM - A/A',
  'name': 'SmartStore',
  'url': '',
  'interval': 15,
  'step_timeout': 30,
  'transaction_steps': 3

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

# Create the monitor
headers = {
  'Authorization': 'Bearer ' + token,
  'Content-Type': 'application/json'
r ='/monitors/dejaclick', data=json.dumps(monitor_params), headers=headers)
result = r.json()
if r.status_code ==
    monitor_id = result['id']
    print('Successfully created the monitor. ID:{}'.format(monitor_id))
    print('Could not create a monitor. The following error(s) occurred:', *result['errors'], sep='\n')

See Also

Monitor Operations
Edit a Website Monitor
Delete Monitor

Highlight search results