Skip to main content
POST
/
v1
/
segments
curl --request POST \
--url https://{cluster}.voucherify.io/v1/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '{
"name": "Customers in a new Segment",
"type": "static",
"customers": [
"cust_iajsExT2QB4sGWzABY85WRqV",
"cust_sehkNIi8Uq2qQuRqSr7xn4Zi"
]
}'
{
"id": "seg_vC8iOSCqUG02EsPzsHynLv8i",
"name": "Customers in a new Segment",
"created_at": "2022-09-13T08:57:15.801Z",
"type": "static",
"filter": null,
"initial_sync_status": "DONE",
"object": "segment"
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

Body

application/json
  • Static Customer Segment
  • Active or Passive Customer Segment
name
string
type
enum<string>
default:static
Available options:
static
customers
string[]

Response

200 - application/json
id
string
Example:
name
string
created_at
string<date-time>
Example:
type
enum<string>
Available options:
auto-update,
passive,
static
filter
object | null
object
enum<string>
default:segment
Available options:
segment