Returning.AI
  1. Users
Returning.AI
  • Returning.AI
    • Auth
      • secure auth
      • register
      • verify email
      • login
    • Server
      • create new server
      • get my servers
      • update server
      • role list of server
      • channel list of server
    • Role
      • create new role
      • update role
      • delete role
      • add role to a user on a server
      • remove role from a user on a server
      • get role list of user on a server
    • Channel
      • get channels list
      • create new channel
      • update channel
      • delete channel
    • Badge
      • get badges list
      • create new badge
      • update badge
      • delete badge
      • award badge to user
      • remove badge from user
    • Integration
      • Users
        • Create New User
          POST
        • Get User Data
          POST
        • Get Users with Filters
          POST
        • Manage User account
          POST
        • Get User Gamification History
          GET
        • Get User Gamification Stats
          POST
        • Bulk Import
          POST
        • Bulk Update
          POST
      • Messages
        • Send Message
        • Reply Message
        • React Message
      • Channels
        • Get Channels List
      • User Api Key
        • Get User Api Key
        • Post User Api Key
        • Update User Api Key
        • Delete Endpoint
        • api key info
    • Application
      • Community Users
        • Get community users
        • Get user
      • User Fields
        • Get all user fields for a community
        • Get specific user field
        • Create user field
        • Update user field
        • Delete user field
      • User Field Histories
        • Get all user field histories in a community
        • Get user field histories for a specific field
        • Get user field histories for a specific user
        • Get user field histories of specific user field and user
        • Create user field history for specific user
  1. Users

Get Users with Filters

POST
/apis/v1/users/filter
This endpoint searches and retrieves platform users based on specified filter criteria, returning only the requested fields for each matching user. It provides flexible filtering capabilities with pagination support for large result sets.

Authorization#

Bearer token Required
Found in the platform under community settings > API keys.
Permission: Get User Data

Available Fields#

All user fields (including custom fields) can be requested in the response.
Example platform fields:
Platform fieldField name
Emailemail
First Namefirst_name
Last Namelast_name
Join datejoin_date
Total XPxp
Total Coinscoins
Field names in the request must match the database column names shown in the user fields table.
image.png

Filter Options#

All user fields (including custom fields) can be filtered.
The filter parameter supports three types of filtering operations:

1. Exact Match#

Filter users by exact field value.

2. Comparison Operators#

Use operators for numeric and date field comparisons:
Supported operators:
gte - Greater than or equal to
lte - Less than or equal to
gt - Greater than
lt - Less than

3. Range Queries#

Combine operators to filter within a range.

Pagination#

Results are paginated with a fixed page size of 200 records per response.
The API supports two pagination methods:

Cursor-Based Pagination (Recommended)#

Use for sequential retrieval of all pages:
1.
Response includes next_cursor when more results exist.
2.
Send cursor parameter in subsequent requests to get the other pages.

Page-Based Pagination#

Use to get to a specific page:
1.
Response includes total_pages and current_page.
2.
Send page with the number in subsequent requests to get the specific page.
Important: Do not send both cursor and page parameters in the same request. Choose one pagination method per request sequence.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "fields": [
        "email",
        "join_date",
        "first_name",
        "last_name"
    ],
    "filter": {
        "join_date": {
            "lte": "2025-08-28",
            "gte": "2025-01-01"
        },
        "first_name": "Annie"
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://integration.returning.ai/apis/v1/users/filter' \
--header 'Content-Type: application/json' \
--data-raw '{
    "fields": [
        "email",
        "join_date",
        "first_name",
        "last_name"
    ],
    "filter": {
        "join_date": {
            "lte": "2025-08-28",
            "gte": "2025-01-01"
        },
        "first_name": "Annie"
    }
}'

Responses

🟢200Success - without pagination
application/json
Body

Example
{
    "status": "success",
    "data": {
        "pagination": {
            "total": 14,
            "currentPage": 1,
            "totalPages": 1,
            "hasNextPage": false,
            "hasPrevPage": false
        },
        "data": [
            {
                "email": "Test@gmail.com",
                "join_date": "2025-03-03T03:24:54.828Z",
                "first_name": "Test",
                "last_name": "Lee"
            },
            ...
            {
                "email": "coffeeplanetklee@outlook.com",
                "join_date": "2025-02-13T04:44:56.067Z",
                "first_name": "Klee",
                "last_name": "Planet"
            }
        ]
    }
}
🟢200Success - with pagination
Modified at 2025-08-12 10:33:55
Previous
Get User Data
Next
Manage User account