Skip to main content
GET/segments/:id/users/

View user segment

You can return all users assigned to a specific user segment.

Attributes

Optional unless marked required

idintegerrequired
A unique identifier for the users' segment which is given by User automatically.

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/segments/:id/users/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 1286,
"key": "g7lvoickax9e",
"name": "johndoe@example.com",
"email": "johndoe@example.com",
"gender": "unknown",
"status": "user",
"phone_number": null,
"first_seen": "2026-08-18T12:31:49.448368Z",
"last_seen": "2026-08-18T12:33:39.766442Z",
"page_views": 3,
"last_ip": "127.0.0.1",
"timezone": "Example timezone",
"city": "value",
"region": "value",
"country": "value",
"unsubscribed": false,
"browser_language": "en",
"widget_language": null,
"score": 0,
"browser": "Example browser",
"os_type": "Example os type",
"resolution": "Example resolution",
"created_at": "2026-08-18T12:31:49.469294Z",
"updated_at": "2026-08-31T10:45:00.035496Z",
"companies": ,1 item
"attributes": ,2 items
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"last_contacted": null,
"user_id": "Example user id",
"web_push_subscription": false,
"assigned_to": null,
"most_active_time": "Example most active time",
"lt_opened_email": null,
"lt_clicked_email": null,
"email_mx_valid": false,
"referrer": "https://example.com/",
"last_heard_from": null,
"spambounced": false,
"softbounced": false,
"hardbounced": false,
"marked_email_as_spam": true,
"email_opt_in": null,
"email_tracking_optin": null
},
{
"id": 1117,
"key": "g7lvoickax9e",
"name": "Example name",
"email": "johndoe@example.com",
"gender": "male",
"status": "visitor",
"phone_number": "+48123456789",
"first_seen": null,
"last_seen": null,
"page_views": 0,
"last_ip": null,
"timezone": null,
"city": null,
"region": null,
"country": null,
"unsubscribed": false,
"browser_language": null,
"widget_language": null,
"score": 0,
"browser": null,
"os_type": null,
"resolution": null,
"created_at": "2026-06-12T08:45:57.632048Z",
"updated_at": "2026-06-12T11:00:08.287478Z",
"companies": [],
"attributes": ,2 items
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"last_contacted": "2026-06-19T09:32:01.274933Z",
"user_id": null,
"web_push_subscription": false,
"assigned_to": null,
"most_active_time": null,
"lt_opened_email": null,
"lt_clicked_email": null,
"email_mx_valid": true,
"referrer": null,
"last_heard_from": null,
"spambounced": false,
"softbounced": false,
"hardbounced": true,
"marked_email_as_spam": true,
"email_opt_in": true,
"email_tracking_optin": null
}
]
}

Response fields​

Fields returned in the 200 OK response body.

countinteger
Number of results across all pages. It can lag behind recent changes; see Response pagination.
nextstring (URL)nullable
URL of the next page of results. null on the last page.
previousstring (URL)nullable
URL of the previous page of results. null on the first page.
resultsarray of objects
Results on this page.
results[].idinteger
A unique identifier for the users' segment which is given by User automatically.
results[].keystring
Unique key of the contact (12 random characters), given by User.
results[].namestring
Full name of the contact, made from the first and last name.
results[].emailstring
Main email address of the contact. Several contacts can share an address.
results[].genderstring
A user gender (1 - unknown, 2 - male, 3 - female)
results[].statusstring
user if the contact's email address has been sent to User through the code on your website, otherwise visitor.
results[].phone_numberstringnullable
Phone number of the contact.
results[].first_seenstring (date-time)nullable
A date for user's first website visit.
results[].last_seenstring (date-time)nullable
A date of last user's website visit.
results[].page_viewsinteger
A total number of user's page visits occurrences.
results[].last_ipstringnullable
An address IP (identifier assigned to each device, e.g., laptop, printer, mobile etc.) from the last user visit.
results[].timezonestringnullable
A timezone of the user's browser.
results[].citystringnullable
City of the contact's last visit, based on the IP address.
results[].regionstringnullable
Region of the contact's last visit, based on the IP address.
results[].countrystringnullable
Country of the contact's last visit, based on the IP address.
results[].unsubscribedboolean
A flag true/false informing if user is unsubscribed from emails.
results[].browser_languagestringnullable
A user's browser language
results[].widget_languagestringnullable
Language of the chat widget for this contact, used when the widget is set to follow it; null if not set.
results[].scoreinteger
A number of points assinged to the user.
results[].browserstringnullable
A name of user's browser last used to visit your website.
results[].os_typestringnullable
An operating system of the user’s device
results[].resolutionstringnullable
A screen resolution of the device the user has visited your website.
results[].created_atstring (date-time)
When the contact was created, ISO 8601.
results[].updated_atstring (date-time)
When the contact was last updated, ISO 8601.
results[].companiesarray of objects
Companies the contact is a member of.
results[].companies[].namestring
Name of the company.
results[].companies[].idinteger
A unique identifier for the users' segment which is given by User automatically.
results[].companies[].member_sincestring (date-time)
Despite the name, when the company was created (its created_at), not when the contact joined it.
results[].attributesarray of objects
Custom contact attributes that have a value, each with id, name, name_std, value, description and value_type.
results[].attributes[].idinteger
A unique identifier for the users' segment which is given by User automatically.
results[].attributes[].namestring
Name of the attribute.
results[].attributes[].name_stdstring
Standardized name of the attribute, used as its key in the API.
results[].attributes[].valueobject | array of string | boolean | integer | string | string (date-time)
Value of the attribute for this contact.
results[].attributes[].descriptionstring
Description of the attribute.
results[].attributes[].value_typeinteger
Value type of the attribute: 1 boolean, 2 integer, 3 date, 4 string, 5 datetime, 6 fixed (a list of choices), 7 float or 8 JSON.
results[].gravatar_urlstring (URL)nullable
A user avatar url from gravatar.
results[].listsarray of objects
Lists the contact is on, each with id, name and description.
results[].lists[].idinteger
A unique identifier for the users' segment which is given by User automatically.
results[].lists[].namestring
Name of the list.
results[].lists[].descriptionstring
Description of the list.
results[].tagsarray of objects
Tags of the contact.
results[].tags[].idinteger
A unique identifier for the users' segment which is given by User automatically.
results[].tags[].namestring
Name of the tag.
results[].notificationsboolean
A flag true/false informing if your team is receiving notifications about new chat messages from this user.
results[].facebook_urlstringnullable
A URL of user's Facebook profile.
results[].linkedin_urlstringnullable
A URL of user's LinkedIn profile.
results[].twitter_urlstringnullable
A URL of user's Twitter profile.
results[].google_urlstringnullable
A URL of user's Google+ profile.
results[].last_contactedstring (date-time)nullable
A date of last contact with user - any communication (email or chat, automated or otherwise) sent from your team to the user.
results[].user_idstringnullable
A unique identifier for the user which is given by User automatically.
results[].web_push_subscriptionboolean
A flag true/false informing if user is unsubscribed from webpush.
results[].assigned_tointegernullable
ID of the agent group the contact is assigned to, or null.
results[].most_active_timestringnullable
Most Active Time is an attribute that is based on historical data determined by the hours of previous use and the most likely active use. Time in this attribute is positioned in the UTC timezone, and there's no possible way to change the timezone for the attribute.
results[].lt_opened_emailstring (date-time)nullable
When the contact last opened one of your emails.
results[].lt_clicked_emailstring (date-time)nullable
When the contact last clicked a link in one of your emails.
results[].email_mx_validboolean
Whether the email address passed User's validation; set to false after a hard bounce.
results[].referrerstring (URL)nullable
URL of the page the contact came to your website from.
results[].last_heard_fromstring (date-time)nullable
When the contact last sent your team a message (chat or email). Emails count only once your inbox is connected over IMAP.
results[].spambouncedboolean
true once an email to the contact bounced as spam.
results[].softbouncedboolean
true once an email to the contact soft-bounced.
results[].hardbouncedboolean
true once an email to the contact hard-bounced or was dropped.
results[].marked_email_as_spamboolean
Defaults to true and isn't changed when emails bounce; check spambounced for spam bounces.
results[].email_opt_inbooleannullable
Email marketing consent: true given, false refused, null not recorded.
results[].email_tracking_optinbooleannullable
Consent to email open and click tracking: true given, false refused, null not recorded.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.