Create a personalization rule

Creates a rule with its conditions and actions in a single transaction. If the requested name collides with an existing rule, the server auto-appends a suffix. If priority is omitted, the server places the new rule at the end of the list.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

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

Body Params

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
conditions
array

Conditions for the rule. On PATCH, null preserves existing; a list replaces them entirely.

conditions
string
length between 0 and 1000

Optional human-readable description.

string
length between 0 and 200

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

int32

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

boolean

If true, actions fire at most once per visitor session.

string
enum

Lifecycle status. DRAFT = saved but inactive, ACTIVE = running on the site, PAUSED = temporarily disabled.

Allowed:
Responses

400

Payload validation failed (missing required field, invalid value, unknown popup name, etc.)

404

Site not found

405

Method Not Allowed

500

Internal Server Error

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json