v1

latestOpenAPI 3.0.32026-07-1416063.7 KB

Create Segment

This endpoint creates a new segment and associates it with the client.

post/segments

Request body

namestring required

The name used to easily identify the bot. Allowed values are between 2 and 255 characters.

statusstring required

The status of the bot. Allowed values are active and inactive.

number_idinteger required

The Number ID associating the segment with a number.

typestring required

The type of segment. Allowed values are static and dynamic.

dynamic_bodyobject

The dynamic body defining the logic for dynamic segments. Required when type is set to dynamic.

Response

201

Example response

{
  "data": {
    "id": 1,
    "name": "Main Subscribers",
    "number_id": 1,
    "type": "static",
    "status": "active"
  }
}