Skip to main content
POST
Preview Variant Find Replace

Headers

authorization
string | null
X-Organization-ID
string | null

Path Parameters

product_key
string
required

Cookies

stytch_session
string | null

Body

application/json

Body for BOTH the preview (dry run) and the apply route.

find
string
required

Literal text to find (never a regex).

Minimum string length: 1
property_key
string
required

Variant-level property to edit.

Minimum string length: 1
variant_keys
string[]
required
Required array length: 1 - 5000 elements
case_sensitive
boolean
default:false

Default: case-insensitive matching.

expected_will_change
integer | null

Apply only: the will_change count the user confirmed from the preview. When set and it differs from the count recomputed at apply time, the write is refused with error 'will_change_mismatch' and the recomputed count. Ignored by preview.

Required range: x >= 0
replace
string
default:""

Literal replacement; may be empty (deletes the match).

Response

Successful Response

selected
integer
required

Distinct variant keys in the request.

unchanged
integer
required

Variants whose value contains no occurrence.

will_change
integer
required

Variants whose value would change (the confirm count).

samples
VariantFindReplaceSample · object[]

At most 10.

skipped
VariantFindReplaceSkipped · object[]