Segments

Update a segment condition

Replaces one or more values of a segment condition and republishes the website script, so every live campaign targeting the segment changes for visitors at once. The body keys are the settings of the condition type as GET /api/v1/segments/condition_types lists them: free-text settings take any value, number settings a whole number, select settings one of the available options (ids for campaigns, segments and tags; values for device type and contact fields; field slugs for custom fields; comma-separated ISO alpha-2 codes for countries). Region and city keywords are comma-separated full names and replace the whole list; two-letter region abbreviations are refused because visitor geolocation reports full names. A key that is not a setting of the condition type answers 422, as do condition types without settings and integration conditions. Requires segments:write.

patch/api/v1/segments/{id}/conditions/{condition_id}

Request

  • Base URL
    https://app.convertflow.co
  • Auth
    HTTP bearer

Request body

keywordstring

Text or number setting (region/city names comma-separated)

urlstring

URL, cookie or global variable name

countinteger

Number setting

countrystring

ISO alpha-2 country codes, comma-separated

condition_ctainteger

Campaign id

tag_idinteger

Tag id

devicestring

desktop or mobile

conditions_group_idinteger

Segment id

attributestring

Contact field name

slugstring

Custom field slug

operator'and' | 'or'

How the condition combines with the others in the segment

Response

condition updated; the website republishes only when a value changed

idinteger
namestring
website_idinteger
created_atstring date-time
updated_atstring date-time

Changes

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