Personalization Rules

Update a personalization rule

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.

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

Path parameters

site_namestring required

The site's unique name (its ID), returned when the site is created.

idstring required

Rule id

Request body

descriptionstring

Optional human-readable description.

namestring

Rule name. Required on create; if it collides with an existing rule on the site, the server appends a suffix.

priorityinteger

Optional priority. If omitted on create, the server assigns max(priority)+1.

show_onceboolean

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.

Example request

{
  "action": {
    "html": "<b>40% OFF this weekend!</b>",
    "background_color": "#FFEB3B",
    "duration_seconds": 5
  },
  "conditions": [
    {
      "visit_number": 1
    }
  ],
  "name": "Welcome popup for new visitors",
  "priority": 5,
  "show_once": true
}

Response

The updated rule

creation_timestring date-time

When the rule was created.

descriptionstring

Optional human-readable description.

idstring

Stable per-site rule identifier.

manageable_via_apiboolean

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.

namestring

User-facing rule name. Unique per site.

priorityinteger

Priority within the site. Lower numbers run earlier.

show_onceboolean

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.

Example response

{
  "action": {
    "html": "<b>40% OFF this weekend!</b>",
    "background_color": "#FFEB3B",
    "duration_seconds": 5
  },
  "conditions": [
    {
      "visit_number": 1
    }
  ],
  "id": "12345",
  "manageable_via_api": true,
  "name": "Welcome popup for new visitors",
  "priority": 1,
  "show_once": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.