Update Segment
POST
/admin/analytics/segments/{id}
const url = 'http://localhost:9000/admin/analytics/segments/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","label":"example","description":"example","rules":"AND","conditions":["event_performed"],"event":"example","count":{},"timeframe_days":1,"key":"example","operator":"example","sales_channel_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:9000/admin/analytics/segments/example \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "label": "example", "description": "example", "rules": "AND", "conditions": [ "event_performed" ], "event": "example", "count": {}, "timeframe_days": 1, "key": "example", "operator": "example", "sales_channel_id": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
string
label
string
description
string
rules
required
string
conditions
required
Array<string>
event
string
count
object
key
additional properties
any
timeframe_days
number
key
string
operator
string
sales_channel_id
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
Example generated
{}