---
title: "Update"
method: PUT
path: "/alerts_conditions/{condition_id}.json"
tags: ["Alerts Conditions"]
---

# Update

`PUT /alerts_conditions/{condition_id}.json`

## Request

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

🔥🔥 New users should use <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>

<p>This API endpoint allows you to update APM Application and Key Transaction, Browser and Mobile application metric conditions for your alert policies.</p>

<p><strong>Conditions for web transaction percentiles, or conditions targeting labels (dynamic targeting), are not available.</strong></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 Alerts Conditions &gt; Create for an explanation of the field values or the online
documentation on <a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#conditions-update" target="_blank">updating conditions for policies</a>.</p>

## Path parameters

- `condition_id` integer, required

## Request body

- Condition
  - `condition` ConditionBody
    - `condition_scope` string
    - `enabled` boolean
    - `entities` integer[]
    - `gc_metric` string
    - `metric` string
    - `name` string
    - `terms` IJKTermsType[]
      - `duration` string
      - `operator` string
      - `priority` string
      - `threshold` string
      - `time_function` string
    - `type` string
    - `user_defined` UserDefinedConditionBody
      - `metric` string
      - `value_function` string
    - `violation_close_timer` integer

## Response `200`

No response was specified

- ConditionResponse
  - `condition` ConditionResponseType
    - `condition_scope` string
    - `enabled` boolean
    - `entities` integer[]
    - `gc_metric` string
    - `id` integer
    - `metric` string
    - `name` string
    - `runbook_url` string
    - `terms` IJKTermsType[]
      - `duration` string
      - `operator` string
      - `priority` string
      - `threshold` string
      - `time_function` string
    - `type` string
    - `user_defined` UserDefinedConditionResponse
      - `metric` string
      - `value_function` string
    - `violation_close_timer` integer

---

[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)
