Skip to main content
GET/users/search/?custom_attr__gte=:10

Filter users by custom attribute

You can return users based on their custom attributes.

AttributesTypeRequiredDescription
custom_attrstringyesA name of your custom attribute.
LookupsWorks withDescription
__ltintegerless than
__lteintegerless than or equal
__gtintegergreater than
__gteintegergreater than or equal
__startswithstringvalue of given attribute starts with (case sensitive)
__istartswithstringvalue of given attribute starts with (case insensitive)
__endswithstringvalue of given attribute ends with (case sensitive)
__iendswithstringvalue of given attribute ends with (case insensitive)
__containsstringvalue of given attribute contains string (case insensitive)
__icontainsstringvalue of given attribute contains string (case insensitive)

Request​

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

Response examples​

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1924,
"user_key": "g7lvoickax9e",
"name": "Alexandra Doe",
"email": "johndoe@example.com",
"gender": "unknown",
"status": "visitor",
"phone_number": null,
"first_seen": null,
"last_seen": null,
"page_views": 0,
"last_ip": null,
"timezone": null,
"city": null,
"region": null,
"country": null,
"unsubscribed": true,
"browser_language": null,
"widget_language": null,
"score": 0,
"browser": null,
"os_type": null,
"resolution": null,
"created_at": "2026-11-10T14:20:02.361287Z",
"updated_at": "2026-11-10T14:20:04.790980Z",
"companies": [],
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"last_contacted": null,
"custom_id": "alex",
"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": false,
"marked_email_as_spam": true,
"email_opt_in": null,
"email_tracking_optin": null
}
]
}

Response fields​

Fields returned in the 200 OK response body.

FieldTypeDescription
count
integer
integerNumber of results across all pages. It can lag behind recent changes; see Response pagination.
next
string (URL)nullable
string (URL)nullableURL of the next page of results. null on the last page.
previous
string (URL)nullable
string (URL)nullableURL of the previous page of results. null on the first page.
array of objects
array of objectsResults on this page.
results[].id
integer
integerA unique identifier for the user which is given by User automatically.
results[].user_key
string
stringA unique identifier (12 random characters) for the user which is given by User automatically.
results[].name
string
stringRead-only attribute, made from the combination of the first_name and last_name attributes.
results[].email
string
stringA user email
results[].gender
string
stringunknown (default), male or female. Not detected automatically.
results[].status
string
stringuser if the contact's email address has been sent to User through the code on your website, otherwise visitor.
results[].phone_number
stringnullable
stringnullableA user phone number
results[].first_seen
stringnullable
stringnullableA date for user's first website visit.
results[].last_seen
datetimenullable
datetimenullableA date of last user's website visit.
results[].page_views
integer
integerA total number of user's page visits occurrences.
results[].last_ip
stringnullable
stringnullableAn address IP (identifier assigned to each device, e.g., laptop, printer, mobile etc.) from the last user visit.
results[].timezone
stringnullable
stringnullableA timezone of the user's browser.
results[].city
stringnullable
stringnullableCity of the contact's last visit, based on the IP address.
results[].region
stringnullable
stringnullableRegion of the contact's last visit, based on the IP address.
results[].country
stringnullable
stringnullableCountry of the contact's last visit, based on the IP address.
results[].unsubscribed
boolean
booleanA flag true/false informing if user is unsubscribed from emails.
results[].browser_language
stringnullable
stringnullableA user's browser language
results[].widget_language
stringnullable
stringnullableLanguage of the chat widget for this contact, used when the widget is set to follow it; null if not set.
results[].score
integer
integerA number of points assinged to the user.
results[].browser
stringnullable
stringnullableA name of user's browser last used to visit your website.
results[].os_type
stringnullable
stringnullableAn operating system of the user’s device
results[].resolution
stringnullable
stringnullableA screen resolution of the device the user has visited your website.
results[].created_at
string (date-time)
string (date-time)A creation date of a user.
results[].updated_at
string (date-time)
string (date-time)A date of last user update.
results[].companies
array
arrayCompanies the contact is a member of, each with id, name and member_since.
results[].gravatar_url
stringnullable
stringnullableA user avatar url from gravatar.
results[].lists
array
arrayA list of lists assigned to the user.
results[].tags
array
arrayA list of tag names.
results[].notifications
boolean
booleanA flag true/false informing if your team is receiving notifications about new chat messages from this user.
results[].facebook_url
stringnullable
stringnullableA URL of user's Facebook profile.
results[].linkedin_url
stringnullable
stringnullableA URL of user's LinkedIn profile.
results[].twitter_url
stringnullable
stringnullableA URL of user's Twitter profile.
results[].google_url
stringnullable
stringnullableA URL of user's Google+ profile.
results[].last_contacted
datetimenullable
datetimenullableA date of last contact with user - any communication (email or chat, automated or otherwise) sent from your team to the user.
results[].custom_id
string
stringThe unique identifier for the user which is provided by the client.
results[].web_push_subscription
boolean
booleantrue if the contact has at least one web push subscription.
results[].assigned_to
integernullable
integernullableID of the agent group the contact is assigned to, or null.
results[].most_active_time
stringnullable
stringnullableMost 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_email
string (date-time)nullable
string (date-time)nullableWhen the contact last opened one of your emails.
results[].lt_clicked_email
string (date-time)nullable
string (date-time)nullableWhen the contact last clicked a link in one of your emails.
results[].email_mx_valid
boolean
booleanWhether the email address passed User's validation; set to false after a hard bounce.
results[].referrer
stringnullable
stringnullableURL of the page the contact came to your website from.
results[].last_heard_from
string (date-time)nullable
string (date-time)nullableWhen the contact last sent your team a message (chat or email). Emails count only once your inbox is connected over IMAP.
results[].spambounced
boolean
booleantrue once an email to the contact bounced as spam.
results[].softbounced
boolean
booleantrue once an email to the contact soft-bounced.
results[].hardbounced
boolean
booleantrue once an email to the contact hard-bounced or was dropped.
results[].marked_email_as_spam
boolean
booleanDefaults to true and isn't changed when emails bounce; check spambounced for spam bounces.
results[].email_opt_in
booleannullable
booleannullableEmail marketing consent: true given, false refused, null not recorded.
results[].email_tracking_optin
booleannullable
booleannullableConsent 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.