---
title: "Create a new monitor for the request account"
method: POST
path: "/monitors"
tags: ["monitors"]
---

# Create a new monitor for the request account

`POST /monitors`

Creates a new monitor and returns the definition

## Request body

- MonitorPost — The configurable attributes of a monitor
  - `type` 'logs' | 'object-data-plane' | 'signal', required — Type of the monitor
  - `actions` MonitorAction[] — A sequence of actions executed when the monitor triggers.
    - union — An action to be executed when the monitor triggers.
      - object — Enables shield mode for the monitored application(s).
        - `type` 'enable_shield_mode', required
      - object — Publishes monitor activity to the event log.
        - `type` 'log_events', required
      - object — Sends monitor notifications to configured recipients.
        - `type` 'notify', required
        - `message` string, required
        - `notify` string[], required
      - object — Replaces server identified by the monitor
        - `type` 'replace_server', required
      - object — Manage the tickets through alerts
        - `type` 'manage_tickets', required
        - `message` string, required — General text message for manage_tickets action to update in the ticket
        - `service` string — Ticket service used for communicating with the ticketing tool
  - `name` string, required — Name of the monitor
  - `description` string — Description of the monitor
  - `labels` Label[], required — An array of labels to which this monitor applies
  - `message` string — The template to use to generate the notification message
  - `notify` MonitorNotification[] — An array of URLs to which the notification may be sent
  - `log_events` boolean — A boolean that determines if monitor state changes are added to the event log.
  - `parameters` union, required
    - object — The configuration of an signal monitor
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - LogsMonitorParameters — The configuration of a logs monitor
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - object — The configuration of an object monitor
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - object — The configuration of a logs monitor
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - object — The configuration of an signal monitor
      - `budget` number, float — The number of data transfer allowance in GB this account is entitled.
      - `thresholds` DataTransferBillingThreshold[] — An array of thresholds.
        - `type` 'budget' | 'allowance', required — The type of threshold.
        - `percent` number, float, required — The percent of data transfer when this threshold will trigger.
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - object — The configuration of a logs monitor
      - `budget` number, float — The number of data transfer allowance in GB this account is entitled.
      - `thresholds` DataTransferBillingThreshold[] — An array of thresholds.
        - `type` 'budget' | 'allowance', required — The type of threshold.
        - `percent` number, float, required — The percent of data transfer when this threshold will trigger.
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - object — The configuration of an object monitor
      - `budget` number, float — The number of data transfer allowance in GB this account is entitled.
      - `thresholds` DataTransferBillingThreshold[] — An array of thresholds.
        - `type` 'budget' | 'allowance', required — The type of threshold.
        - `percent` number, float, required — The percent of data transfer when this threshold will trigger.
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - object — The configuration of a data transfer billing monitor
      - `budget` number, float — The number of data transfer allowance in GB this account is entitled.
      - `thresholds` DataTransferBillingThreshold[] — An array of thresholds.
        - `type` 'budget' | 'allowance', required — The type of threshold.
        - `percent` number, float, required — The percent of data transfer when this threshold will trigger.
    - object — The configuration of an signal monitor
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - object — The configuration of a logs monitor
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - ObjectMonitorParameters — The configuration of an object monitor
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - object — The configuration of an object monitor
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - SignalMonitorParameters — The configuration of an signal monitor
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - object — The configuration of a logs monitor
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - object — The configuration of an object monitor
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - object — The configuration of an signal monitor
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - object — The configuration of an signal monitor
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - object — The configuration of a logs monitor
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - object — The configuration of an object monitor
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - EmptyObject

## Response `200`

The monitor was successfully created

- Monitor — The state of the monitor.
  - `type` 'logs' | 'object-data-plane' | 'signal' — Type of the monitor
  - `actions` MonitorAction[] — A sequence of actions executed when the monitor triggers.
    - union — An action to be executed when the monitor triggers.
      - object — Enables shield mode for the monitored application(s).
        - `type` 'enable_shield_mode', required
      - object — Publishes monitor activity to the event log.
        - `type` 'log_events', required
      - object — Sends monitor notifications to configured recipients.
        - `type` 'notify', required
        - `message` string, required
        - `notify` string[], required
      - object — Replaces server identified by the monitor
        - `type` 'replace_server', required
      - object — Manage the tickets through alerts
        - `type` 'manage_tickets', required
        - `message` string, required — General text message for manage_tickets action to update in the ticket
        - `service` string — Ticket service used for communicating with the ticketing tool
  - `name` string — Name of the monitor
  - `description` string — Description of the monitor
  - `labels` Label[] — An array of labels to which this monitor applies
  - `message` string — The template to use to generate the notification message
  - `notify` MonitorNotification[] — An array of URLs to which the notification may be sent
  - `log_events` boolean — A boolean that determines if monitor state changes are added to the event log.
  - `parameters` union
    - LogsMonitorParameters — The configuration of a logs monitor
      - `type` 'cdn-logs' | 'csp-reports' | 'pageviews' | 'proxy-logs' | 'custom' | 'events', required — The log type that will be monitored
      - `duration` integer, required — An integer of value 1 or more.
      - `group_by` union
        - string[] — An array of attribute names that determine how logs are grouped during execution
        - unknown
      - `filter` union
        - string — String predicate expression involving log attributes for the specified log type
        - unknown
      - `condition` string, required — String predicate expression of the form 'function_name(arg_list)' where arg_list lists one or more arguments (integer, float, string, word)
    - DataTransferBillingMonitorParameters — The configuration of a data transfer billing monitor
      - `budget` number, float — The number of data transfer allowance in GB this account is entitled.
      - `thresholds` DataTransferBillingThreshold[] — An array of thresholds.
        - `type` 'budget' | 'allowance', required — The type of threshold.
        - `percent` number, float, required — The percent of data transfer when this threshold will trigger.
    - ObjectMonitorParameters — The configuration of an object monitor
      - `attribute` 'static_ips', required — A JMESPath to an attribute of the object being monitored for changes.
      - `href` string, required — A reference to the object being monitored
    - SignalMonitorParameters — The configuration of an signal monitor
      - `inactivity_resolution_interval` union
        - integer — An integer of value 0 or more.
        - unknown
    - EmptyObject
  - `href` string — A reference to this monitor
  - `states` GroupState[]
    - `monitor_id` string — The ID of the monitor.
    - `subject` string — The subject of the monitor.
    - `scope` object — The unique scope of defines this monitoring state.
    - `state` boolean — Whether or not this state is triggered.
    - `updated` string — An iso8601 formatted timestamp

---

[API](https://skmtc.dev/webscale/apis/webscale-apis.md) · [All operations](https://skmtc.dev/webscale/apis/webscale-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webscale/webscale-apis/revisions/c98d872b50cb/schema)
