---
title: "Partially update the targeting rule"
method: PATCH
path: "/targeting-rules/{targetingRuleId}"
tags: ["TargetingRule"]
---

# Partially update the targeting rule

`PATCH /targeting-rules/{targetingRuleId}`

Update several fields of the targeting rule

## Path parameters

- `targetingRuleId` integer, required

## Query parameters

- `experimentId` integer, required

## Request body

- TargetingRuleUpdateIO
  - `segmentConfiguration` 'ALL_VISITORS' | 'AUTOPROMO_AUTODEFINED' | 'GRAPHICAL_PAGES' | 'HEAT_SLICE' | 'PAGE' | 'SAVED_TEMPLATE' | 'SITE' | 'URL' — Configuration defining how the segment should be applied
  - `segmentId` integer — Id of the associated segment (user group) for targeting. If segment is deprecated, no trigger will be available for this rule.
  - `targetingConfigurationParam` string — Additional parameters for trigger configuration. For SAVED_TEMPLATE/HEAT_SLICE - contains segment Id. For PAGE - contains full URL. For URL - contains URL fragment.
  - `triggerConfiguration` 'ALL_VISITORS' | 'AUTOPROMO_AUTODEFINED' | 'GRAPHICAL_PAGES' | 'HEAT_SLICE' | 'PAGE' | 'SAVED_TEMPLATE' | 'SITE' | 'URL' — Configuration defining how the trigger should be applied. ALL_VISITORS configuration is not allowed for this trigger type
  - `triggerId` integer — Id of the associated trigger (activation condition)

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/kameleoon/apis/openapi-definition-for-automation-api.md) · [All operations](https://skmtc.net/kameleoon/apis/openapi-definition-for-automation-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kameleoon/openapi-definition-for-automation-api/revisions/09f2abcea0b5/schema)
