User Segment

ChatBot automatically collects all users that chat with the bot and stores their data in the Users section. You can browse this section to find a particular person or a group that meets specified criteria.

Create segment

Creates new segment.

Properties

parameter type required default
name String(1, 256) required

Request URL

Response example

{ “id”: “<ID>”, “timestamp”: “2018-01-19T11:55:07.552Z”, “status”: { “code”: 200, “type”: “success” } }

List segments

Returns list of Segments.

Request URL

Response example

[ { “id”: “5b7ff8476f7g3fb33c9249a8”, “name”: “Foo”, “users”: 0, “createdAt”: “2019-01-23 13:32:30.163Z” } ]

Segment object

parameter type
id String
name String
users Number
createdAt String

Update segment

Update segment name.

URL Params

Required:

id=[alphanumeric]

Properties

parameter type required default
name String(1, 256) required

Request URL

Response example

{ “timestamp”: “2018-01-19T11:55:07.552Z”, “status”: { “code”: 200, “type”: “success” } }

Remove segment

Remove segment.

URL Params

Required:

id=[alphanumeric]

Request URL

Response example

{ “timestamp”: “2018-01-19T11:55:07.552Z”, “status”: { “code”: 200, “type”: “success” } }

Add members

Adds one or more Users to on or more Segments.

Properties

parameter type required
segments String[1,100] required
users String[1,1000] required

Request URL

Response example

{ “timestamp”: “2018-01-19T11:55:07.552Z”, “status”: { “code”: 200, “type”: “success” } }

menu