---
title: "Create"
method: POST
path: "/alerts_synthetics_conditions/policies/{policy_id}.json"
tags: ["Alerts Synthetics Conditions"]
---

# Create

`POST /alerts_synthetics_conditions/policies/{policy_id}.json`

## Request

- Base URL: `https://api.newrelic.com/v2`
- URL: `https://api.newrelic.com/v2/alerts_synthetics_conditions/policies/{policy_id}.json`
- Auth: API key in header `Api-Key`
- TypeScript: <https://skmtc.dev/newrelic/apis/new-relic-rest-api-v2/docs/alerts_synthetics_conditions/policies/:policy_id.json/post.ts> (a function with typed inputs; its response is checked against the schema)

🔥🔥 New users should use NRQL Alert Conditions, refer to <a href="https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/">these docs about managing alerts via NerdGraph.</a>

<hr>

<p>This API endpoint allows you to create Synthetics conditions for your alert policies.</p>

<p>Note: <a href="https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/rest-api-key">Admin User’s API Key</a> is required.</p>

<p>See our documentation for a discussion on <a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#synthetics-conditions-create" target="_blank">creating Synthetic conditions</a>.</p>

<p>All fields are required except for “runbook_url”, “enabled” (defaults to false).</p>

<p><a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#name" target="_blank">name</a>: A title for your condition.</p>

<p><a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#monitor_id" target="_blank">monitor_id</a>: The GUID of the Synthetics monitor to alert on.</p>

<p><a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#runbook_url" target="_blank">runbook_url</a>: Runbook URL to display in notifications (optional).</p>

<p><a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#enabled" target="_blank">enabled</a>: The status of your condition (optional).</p>

## Path parameters

- `policy_id` integer, required

## Request body

- SyntheticsCondition
  - `synthetics_condition` SyntheticsConditionBody
    - `enabled` boolean
    - `monitor_id` string
    - `name` string
    - `runbook_url` string

## Response `200`

No response was specified

- SyntheticsConditionResponse
  - `synthetics_condition` SyntheticsConditionResponseType
    - `enabled` boolean
    - `id` integer
    - `monitor_id` string
    - `name` string
    - `runbook_url` string

---

[API](https://skmtc.dev/newrelic/apis/new-relic-rest-api-v2.md) - [All operations](https://skmtc.dev/newrelic/apis/new-relic-rest-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/newrelic/apis/new-relic-rest-api-v2/revisions/cf1843ad0a45?raw)
