List users

api-docs Redoc document (api spec)

List users with pagination

get
Authorizations
Query parameters
pageintegerRequired

Page number

page_sizeintegerRequired

Number of items per page

Responses
200
Successful response
application/json
get
GET /api/user/list?page=1&page_size=1 HTTP/1.1
Host: url to be defined
Authorization: YOUR_API_KEY
Accept: */*
200

Successful response

{
  "error": {
    "code": "040",
    "message": "User not found"
  },
  "data": {
    "users": [
      {
        "_id": "MMGqKihnmmqyTgAy",
        "email": "[email protected]",
        "wallet": "CBVE3R2ZV2UWTEXROOVT5GKWOQ5HULDPMEUJWCSA5JEWVTISCNHU3KJHWU",
        "user_role": "admin",
        "createdAt": "2023-01-12T16:35:33.210Z",
        "updatedAt": "2023-01-12T18:20:05.874Z",
        "user_company": "63c04c071ad80d5322929cb1",
        "user_company_txn": "63c04c071ad80d5322929cb1"
      }
    ],
    "metadata": {
      "page": "1",
      "total_items": 4,
      "page_size": "2"
    }
  }
}

This endpoint allows you to list all users with pagination. To access this endpoint, you need to have either the "partner" or "admin" API key. The endpoint requires two parameters in the query, "page" and "page_size", which represent the current page number and the number of items per page, respectively. Both parameters are required and must be of type "integer".

The response from the endpoint will be in JSON format and will contain either an "error" object or a "data" object. The "error" object will have a "code" and a "message" indicating if an error occurred while processing the request. The "data" object will contain information about the users, such as their ID, email, wallet, user role, creation date, last update date, user company ID, and user company transaction ID. The "data" object will also contain a "metadata" object with information about the current page, the total number of items, and the number of items per page.

Last updated