---
title: "Create global alert policy"
method: POST
path: "/api/{cloudId}/v1/alerts/policies"
tags: ["Policies"]
---

# Create global alert policy

`POST /api/{cloudId}/v1/alerts/policies`

Create global alert policy

## Request body

- CreateGlobalPolicyRequest
  - `type` string, required — this can be only alert for global policies
  - `name` string, required — Name of the policy
  - `description` string — Description of the policy
  - `enabled` boolean, required — Initial status of the integration.
  - `filter` object — Conditions specified in this field must be met for this policy to work.
    - `type` 'match-all' | 'match-any-condition' | 'match-all-conditions', required
    - `conditions` object[], required — List of conditions will be checked before applying policy
      - `field` string — Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, responders, teams or priority
      - `not` boolean — Indicates behaviour of the given operation. Default value is false
      - `operation` string — It is the operation that will be executed for the given field and key. Possible operations are matches, contains, starts-with, ends-with, equals, contains-key, contains-value, greater-than, less-than, is-empty and equals-ignore-whitespace.
      - `expectedValue` string — User defined value that will be compared with alert field according to the operation. Default value is empty string
      - `order` number — Order of the condition in conditions list
  - `timeRestriction` object
    - `enabled` boolean, required
    - `timeRestrictions` object[], required
      - `startHour` number
      - `startMinute` number
      - `endHour` number
      - `endMinute` number
    - `appliedTimeZone` string, required
  - `alias` string — Alias of the alert. You can use {{alias}} to refer to the original alias. Default value is {{alias}}
  - `message` string, required — Message of the alert
  - `alertDescription` string — Description of the alert. You can use {{description}} to refer to the original alert description. Default value is {{description}}
  - `source` string — Source field of the alert. You can use {{source}} to refer to the original source. Default value is {{source}}
  - `entity` string — Entity field of the alert. You can use {{entity}} to refer to the original entity. Default value is {{entity}}
  - `responders` object[] — Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If ignoreOriginalResponders field is set to true, this will replace the original responders
    - `type` string
    - `id` string
  - `actions` string[] — Actions as a list of strings to add to the alerts original actions value. If ignoreOriginalActions field is set to true, this will replace the original actions.
  - `tags` string[] — Tags to add to the alerts original tags value as a list of strings. If ignoreOriginalResponders field is set to true, this will replace the original responders.
  - `details` object — Map of key-value pairs to use as custom properties of the alert details. If ignoreOriginalDetails field is set to true, this will replace the original details.
  - `continue` boolean — Will trigger other modify policies if set to true. Default value is false
  - `updatePriority` boolean — If set to true, priority of the alert will be updated based on priorityValue. Default value is false
  - `priorityValue` 'P1' | 'P2' | 'P3' | 'P4' | 'P5' — Priority value of the alert. Should be one of P1, P2, P3, P4, or P5. This field is used when updatePriority is set to true.
  - `keepOriginalResponders` boolean — If set to false, policy will ignore the original responders of the alert. Default value is true
  - `keepOriginalDetails` boolean — If set to false, policy will ignore the original details of the alert. Default value is true
  - `keepOriginalActions` boolean — If set to false, policy will ignore the original actions of the alert. Default value is true
  - `keepOriginalTags` boolean — If set to false, policy will ignore the original tags of the alert. Default value is true

## Response `200`

Returned if the request is successful.

- GlobalPolicyPaginatedResponse
  - `values` PolicyListResponse[]
    - `type` string — type of policy
    - `id` string — Identifier of the policy.
    - `name` string — Name of the policy.
    - `enabled` boolean
    - `order` integer
  - `links` GlobalPolicyLinks
    - `next` string — Link to the next page of results.

## Other responses

- `401` — Returned if the authentication credentials are incorrect.
- `404` — Returned if the maintenance is not found.
- `422` — Returned if the payload cannot be validated.

---

[API](https://skmtc.net/atlassian/apis/jsm-operations-api.md) · [All operations](https://skmtc.net/atlassian/apis/jsm-operations-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/jsm-operations-api/revisions/ed65f017bcb8/schema)
