GET — Segments / Groups
Retrieve all groups configured in your BotPenguin account.
Overview
Method
GET
Endpoint
https://api.v7.botpenguin.com/inbox/segments
Base URL
https://api.v7.botpenguin.com
API Version
v7
Auth Required
Yes — Bearer Token
Content-Type
application/json
Authentication
Authorization
✅ Yes
Bearer YOUR_API_TOKEN
authtype
✅ Yes
Key
Request
Headers
Authorization
✅ Yes
Bearer YOUR_API_TOKEN
authtype
✅ Yes
Key
Content-Type
✅ Yes
application/json
No query parameters or request body required.
Example Request
Response
Success — 200 OK
200 OKResponse Fields
Root Level
success
boolean
true if the request was successful.
message
string
Status message. Empty string on success.
code
number
HTTP status code echo. 200 on success.
data
array
List of all segments configured for the account.
data[] — Segment Object
_id
string
Unique identifier of the segment. Use this ID in the segments filter of POST — Get User Inbox.
_customer
string
ID of the customer account this segment belongs to.
segmentName
string
Display name of the segment as set by the user.
filters
object
The filtering criteria that define which contacts belong to this segment. See filters object below.
status
string
Current state of the segment. Value: ACTIVE.
totalContacts
number
Number of contacts currently matching this segment's filters.
createdAt
string (ISO 8601)
Timestamp when the segment was created.
updatedAt
string (ISO 8601)
Timestamp when the segment was last updated.
__v
number
Internal document version. Not for application use.
filters Object
Defines the rules used to evaluate which contacts belong to this segment.
applicableFilters
array
Active filter keys applied to this segment. Possible values: bots, tags, tagsV2, isSubscriber, status, assignedTo, segments, lastSeenDate. Empty array means no filters applied — all contacts qualify.
_botWebsite
array
Website bot IDs to filter by. Empty if not filtering by website bot.
_botWhatsapp
array
WhatsApp bot IDs to filter by. Empty if not filtering by WhatsApp bot.
_botTelegram
array
Telegram bot IDs to filter by. Empty if not filtering by Telegram bot.
_botFacebook
array
Facebook bot IDs to filter by. Empty if not filtering by Facebook bot.
_botAutomation
array
Instagram/automation bot IDs to filter by. Empty if not applicable.
_agentAssigned
array
Agent IDs to filter by assigned agent. Empty if not filtering by agent.
isOnline
boolean
true to filter only currently online contacts.
status
array
Conversation statuses to filter by. Example: ["OPEN"]. Empty means all statuses.
lastSeenAt
object
Date range filter for last seen timestamp. Contains startAt and endsAt as ISO 8601 strings. Empty strings mean no date restriction.
createdAt
object
Date range filter for contact creation timestamp. Contains startAt and endsAt. Empty strings mean no date restriction.
tags
array
Legacy tag filter. Contains tag strings or tag IDs.
tagsV2
array
Advanced tag filter. Each entry is an object with a filters array containing operator (is) and tags (array of tag names). Multiple tagsV2 entries apply as AND conditions.
userInteracted
boolean
true to include only contacts who have sent a message.
lastMessageBy
array
Filter by last message sender. Values: bot, user, agent. Empty means all.
isSubscriber
boolean
true to include only subscribed contacts.
unreadMessage
boolean
(Conditional) true to filter contacts with unread messages. Present only on older segments.
segments
array
Segment IDs to nest as sub-filters. Allows segments-within-segments filtering.
isLiveChatActive
boolean
true to include only contacts with active live chat sessions.
ctwaNewUsers
boolean
true to filter contacts who are new users from Click-to-WhatsApp ads.
ctwaOldUsers
boolean
true to filter contacts who are returning users from Click-to-WhatsApp ads.
HTTP Status Codes
200
OK
Request succeeded. Segments returned in data array.
401
Unauthorized
Bearer token is missing, invalid, or expired.
429
Too Many Requests
Rate limit exceeded. Retry after the indicated window.
500
Internal Server Error
Server-side error. Contact support if it persists.
Error Handling
All errors return a consistent structure:
Rate Limits
This endpoint is limited to 100 requests per minute per token, across all plans. Exceeding this returns 429 Too Many Requests. Use the Retry-After response header (in seconds) to schedule your retry.
For questions or issues, contact support@botpenguin.com
Last updated
Was this helpful?