curl --request POST \
--url https://api.watx.in/v1/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "September webinar",
"description": "Everyone who registered",
"kind": "static"
}
'{
"data": {
"id": "8c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"name": "September webinar",
"description": "Everyone who registered",
"color": "#6366f1",
"kind": "static",
"filter": null,
"created_at": "2026-09-15T06:41:02.000Z",
"updated_at": "2026-09-15T06:41:02.000Z"
}
}{
"error": {
"code": "bad_request",
"message": "A segment named \"September webinar\" already exists"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}{
"error": {
"code": "forbidden",
"message": "This API key is missing the 'messages:send' scope"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for this API key"
}
}Segments
Create a segment
Creates a segment. kind is static (an explicit membership list) or
dynamic (a saved filter, recomputed on every read) and cannot be
changed afterwards — to switch, delete the segment and create a new
one. A filter is stored only for a dynamic segment.
Names are unique per workspace, case-insensitively, and are capped at 80 characters.
Requires the contacts:write scope.
POST
/
segments
curl --request POST \
--url https://api.watx.in/v1/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "September webinar",
"description": "Everyone who registered",
"kind": "static"
}
'{
"data": {
"id": "8c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"name": "September webinar",
"description": "Everyone who registered",
"color": "#6366f1",
"kind": "static",
"filter": null,
"created_at": "2026-09-15T06:41:02.000Z",
"updated_at": "2026-09-15T06:41:02.000Z"
}
}{
"error": {
"code": "bad_request",
"message": "A segment named \"September webinar\" already exists"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}{
"error": {
"code": "forbidden",
"message": "This API key is missing the 'messages:send' scope"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for this API key"
}
}Authorizations
Your workspace API key, created in Settings → API keys, sent as
Authorization: Bearer <key>. New keys start with watx_live_; keys
issued before the rename start with converse360_live_ and still work.
Body
application/json
Response
The segment was created.
Show child attributes
Show child attributes