This API is used to create a segment. A segment can be created with or without criteria.

Request

The Create Segment request is specified as follows:

Request Headers

Request HeaderDescription
secretKeySecret key generated in backend application
content-typeapplication/json

##Request Example

{
	"name" : "News",
	"criteria" : "News&Channels"
}

Request Body

Elements of the request body

Parameter

Type

Mandatory

Description

name

String

Yes

Specifies the name of the segment.

criteria

String

No

It can be no criteria or combination of topic with operators (&

Response Example

{
	"id" : "594290eae4b0649ee1ef90be",
	"trans_id" : "22a23dbc-af31-4c65-925e-8e74e115ef27",
	"description" : "success",
	"code" : 0
}
Language