---
title: "Update a personalization rule"
method: PATCH
path: "/api/sites/multiscreen/site/{site_name}/personalizations/{id}"
tags: ["Personalization Rules"]
---

# Update a personalization rule

`PATCH /api/sites/multiscreen/site/{site_name}/personalizations/{id}`

## Request

- Base URL: `https://api.duda.co`
- URL: `https://api.duda.co/api/sites/multiscreen/site/{site_name}/personalizations/{id}`
- Auth: HTTP basic

Updates the rule. Fields set to null are preserved. Conditions and actions are replace-on-provide: send null to leave them untouched, or send a list to replace them entirely. Updating conditions/actions on a rule whose existing payload contains UNSUPPORTED entries returns 409 — edit those rules in the editor UI instead.

## Path parameters

- `site_name` string, required
- `id` string, required

## Request body

- PersonalizationRulePayloadRDT: Create or update payload for a personalization rule. On PATCH, any field set to null is preserved; conditions/actions are replace-on-provide. PATCH-ing conditions or actions on a rule whose existing conditions/actions are not manageable via this API returns 409.
  - `action` union
    - NotificationBarActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `html` string, required: HTML content of the bar. Sanitized server-side: script tags and event handlers are stripped.
      - `background_color` string: Bar background color as a CSS hex string (3- or 6-digit).
      - `duration_seconds` integer: Auto-dismiss after N seconds. 0 or omitted means persistent.
    - PopupActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `popup_uuid` string, required: UUID of an existing popup page on this site (pageType = POPUP). Fetch via the Pages API once popup support lands; until then, create the popup in the editor and copy its UUID.
      - `delay_ms` integer: Delay in milliseconds before showing the popup. The runtime applies whole-second granularity, so values are truncated down to the nearest second.
    - SpecialEffectActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `effect_key` string, required: Library effect key. Server validates against the live scripts catalog at write time (see GET /action-types for the current set).
      - `duration_seconds` integer: Display duration in seconds. 0 or omitted means persistent.
    - UnsupportedActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `legacy_action_type` string: Name of the underlying stored action type.
      - `managed_externally` boolean: Always true. Indicates this action is read-only via the API.
  - `conditions` union[]: Conditions for the rule. On PATCH, null preserves existing; a list replaces them entirely.
    - union
      - AlwaysConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
      - UserVisitNumberConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `visit_number` integer, required: Visit number to match (1-based). 1 = first visit only.
      - DateTimeRangeConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `start_at` string, required: Start of the window, ISO-8601 local date-time (e.g. 2026-06-01T09:00:00). Seconds optional.
        - `end_at` string, required: End of the window, ISO-8601 local date-time (e.g. 2026-06-30T17:00:00). Seconds optional.
        - `all_day` boolean: All-day flag. If true, the time portion is ignored.
        - `timezone` string, required: Olson timezone id.
        - `recurrence` string: Optional iCalendar RFC 5545 RRULE for recurrence.
      - DeviceConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `devices` string[], required: Device categories to match.
      - LocationConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `locations` GeoLocation[], required: Geo locations to match against the visitor.
          - `latitude` number, double: Latitude in decimal degrees.
          - `longitude` number, double: Longitude in decimal degrees.
          - `name` string: Human-readable place name.
          - `radiusKm` number, double: Match radius in kilometers around the point.
      - UrlParamsConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `params` object, required: Query parameters that must all be present, as a key/value map.
      - SiteLanguageConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `languages` string[], required: BCP-47 language codes (e.g. en, en-US, fr-CA).
      - UnsupportedConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `legacy_condition_type` string: Name of the underlying stored condition type.
        - `managed_externally` boolean: Always true. Indicates this condition is read-only via the API.
  - `description` string: Optional human-readable description.
  - `name` string: Rule name. Required on create; if it collides with an existing rule on the site, the server appends a suffix.
  - `priority` integer: Optional priority. If omitted on create, the server assigns max(priority)+1.
  - `show_once` boolean: If true, actions fire at most once per visitor session.
  - `status` 'DRAFT' | 'ACTIVE' | 'PAUSED': Lifecycle status. DRAFT = saved but inactive, ACTIVE = running on the site, PAUSED = temporarily disabled.

## Response `200`

The updated rule

- PersonalizationRuleRDT: A personalization rule. Conditions are AND-ed; matching rules run all their actions.
  - `action` union
    - NotificationBarActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `html` string, required: HTML content of the bar. Sanitized server-side: script tags and event handlers are stripped.
      - `background_color` string: Bar background color as a CSS hex string (3- or 6-digit).
      - `duration_seconds` integer: Auto-dismiss after N seconds. 0 or omitted means persistent.
    - PopupActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `popup_uuid` string, required: UUID of an existing popup page on this site (pageType = POPUP). Fetch via the Pages API once popup support lands; until then, create the popup in the editor and copy its UUID.
      - `delay_ms` integer: Delay in milliseconds before showing the popup. The runtime applies whole-second granularity, so values are truncated down to the nearest second.
    - SpecialEffectActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `effect_key` string, required: Library effect key. Server validates against the live scripts catalog at write time (see GET /action-types for the current set).
      - `duration_seconds` integer: Display duration in seconds. 0 or omitted means persistent.
    - UnsupportedActionRDT: A personalization action. The `type` field discriminates the subtype.
      - `target_pages` union: Pages on which the action runs. Either the literal string "ALL" or a list of page aliases. Defaults to "ALL" if omitted.
        - 'ALL'
        - string[]
      - `type` string, required: Discriminator. One of: NOTIFICATION_BAR, POPUP, SPECIAL_EFFECT, UNSUPPORTED
      - `legacy_action_type` string: Name of the underlying stored action type.
      - `managed_externally` boolean: Always true. Indicates this action is read-only via the API.
  - `conditions` union[]: Conditions that must all match for the action to run.
    - union
      - AlwaysConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
      - UserVisitNumberConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `visit_number` integer, required: Visit number to match (1-based). 1 = first visit only.
      - DateTimeRangeConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `start_at` string, required: Start of the window, ISO-8601 local date-time (e.g. 2026-06-01T09:00:00). Seconds optional.
        - `end_at` string, required: End of the window, ISO-8601 local date-time (e.g. 2026-06-30T17:00:00). Seconds optional.
        - `all_day` boolean: All-day flag. If true, the time portion is ignored.
        - `timezone` string, required: Olson timezone id.
        - `recurrence` string: Optional iCalendar RFC 5545 RRULE for recurrence.
      - DeviceConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `devices` string[], required: Device categories to match.
      - LocationConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `locations` GeoLocation[], required: Geo locations to match against the visitor.
          - `latitude` number, double: Latitude in decimal degrees.
          - `longitude` number, double: Longitude in decimal degrees.
          - `name` string: Human-readable place name.
          - `radiusKm` number, double: Match radius in kilometers around the point.
      - UrlParamsConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `params` object, required: Query parameters that must all be present, as a key/value map.
      - SiteLanguageConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `languages` string[], required: BCP-47 language codes (e.g. en, en-US, fr-CA).
      - UnsupportedConditionRDT: A personalization condition. Conditions on a rule are AND-ed together. The `type` field discriminates the subtype.
        - `type` string, required: Discriminator. One of: ALWAYS, USER_VISIT_NUMBER, DATE_TIME_RANGE, DEVICE, LOCATION, URL_PARAMS, SITE_LANGUAGE, UNSUPPORTED
        - `legacy_condition_type` string: Name of the underlying stored condition type.
        - `managed_externally` boolean: Always true. Indicates this condition is read-only via the API.
  - `creation_time` string, date-time: When the rule was created.
  - `description` string: Optional human-readable description.
  - `id` string: Stable per-site rule identifier.
  - `manageable_via_api` boolean: True if every condition and action on this rule is exposed by this API. If false, the rule can be deleted/reordered/renamed but its conditions and actions must be edited in the editor UI.
  - `name` string: User-facing rule name. Unique per site.
  - `priority` integer: Priority within the site. Lower numbers run earlier.
  - `show_once` boolean: If true, actions fire at most once per visitor session.
  - `status` 'DRAFT' | 'ACTIVE' | 'PAUSED': Lifecycle status. DRAFT = saved but inactive, ACTIVE = running on the site, PAUSED = temporarily disabled.

## Other responses

- `400`: Payload validation failed
- `401`: Unauthorized
- `402`: Payment Required
- `404`: Rule or site not found
- `405`: Method Not Allowed
- `409`: Rule contains UNSUPPORTED conditions or actions; edit it in the editor UI. Error code: RULE_CONTAINS_UNMANAGED_ACTIONS
- `429`: Too many requests. The rate limit was exceeded.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/duda/apis/duda-partner-api.md) - [All operations](https://skmtc.dev/duda/apis/duda-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/duda/apis/duda-partner-api/revisions/52be4d41cb12?raw)
