POST
/
customers
/
segments
curl --request POST \
  --url https://services.commercengine.dev/api/v1/x2yh61zw4k/admin/customers/segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "segment_type": "data-driven",
  "data_driven_condition": {},
  "description": "<string>",
  "tags": [
    "<string>"
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "segment_type": "data-driven",
  "data_driven_condition": {},
  "description": "<string>",
  "tags": [
    "<string>"
  ],
  "audience_count": 123,
  "usage_count": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

segment name

segment_type
enum<string>
required
Available options:
data-driven,
manual
data_driven_condition
object

josn object having conditions to match customers profile (columns) and/or events and/or attributes. It is required if segment_type = data-driven

description
string
tags
string[]

Response

200 - application/json
OK
id
string
required

segment id

name
string
required

segment name

segment_type
enum<string>
required
Available options:
data-driven,
manual
data_driven_condition
object

josn object having conditions to match customers profile (columns) and/or events and/or attributes. It is required if segment_type = data-driven

description
string
tags
string[]
audience_count
integer
usage_count
integer
created_at
string
modified_at
string