Create Segment
API Syntax
When using the Create Segment API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:
POST https://api.kevel.co/v1/segment
Where:
POST- the type of API request being made.<https://api.kevel.co>- the URL for the request.v1- the API version.segment- the API endpoint being called.
Name
string
required
The human-friendly name of the segment.
Source
string
Where the segment came from.
Reach
object
The estimated reach of the segment for all time and the last 4 weeks.
Reach object
Description
string
An extended human-friendly description of the segment.
Category
string
The category a segment belongs to.
Advertisers
array of objects
A list of Advertisers that have access to the Segment.
Advertisers
ADD object
``200 200
object
Id
integer
Defaults to 0
Source
string
Name
string
Reach
object
- all_time
integer
Defaults to 0
- 28d
integer
Defaults to 0
Description
string
Category
string
IsDeleted
boolean
Defaults to true
``400 400
Shell
curl -X POST -H "X-Adzerk-ApiKey:<APIKEY>" -H "Content-Type:application/json" https://api.kevel.co/v1/segment --data-binary '{"Category":"CRM","Source":"audience","Description":"top 1% spenders in the last 30 days.","Reach":{"all_time":3187463, "28d":387434},"Name":"best customers"}'
Response Example
{
"Id": 123456,
"Source": "audience",
"Name": "best customers",
"Reach": {
"all_time": 3187463,
"28d": 387434
},
"Description": "top 1% spenders in the last 30 days.",
"Category": "CRM",
"IsDeleted": false
}
Updated 8 months ago