---
agentTools:
  projectIndex: https://ownli.readme.io/llms.txt
---

# List all users.

Retrieve the list of users created by a partner.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "https://api.sandbox.ownli.app",
      "description": "Generated server url"
    }
  ],
  "paths": {
    "/api/users": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List all users.",
        "description": "Retrieve the list of users created by a partner.",
        "operationId": "getUsers",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            },
            "example": 0
          },
          {
            "name": "size",
            "in": "query",
            "description": "Number of items per page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            },
            "example": 10
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Sort by field",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dateRegistered",
              "enum": [
                "firstName",
                "lastName",
                "email",
                "phone",
                "dateRegistered"
              ]
            },
            "example": "dateRegistered"
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Sort by order",
            "required": false,
            "schema": {
              "type": "string",
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "example": "desc"
          },
          {
            "name": "searchBy",
            "in": "query",
            "description": "Search by field",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "firstName",
                "lastName",
                "email",
                "phone",
                "licensePlate"
              ]
            },
            "example": "firstName"
          },
          {
            "name": "searchValue",
            "in": "query",
            "description": "Search by value",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Tom"
          },
          {
            "name": "registrationStartDate",
            "in": "query",
            "description": "Filter users whose registration date is greater or than equal to the date passed in. (The date should be in the ISO8601 UTC format YYY-MM-DDThh:mm:ss.SSSZ) ",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2024-01-01T00:00:00.000Z"
          },
          {
            "name": "registrationEndDate",
            "in": "query",
            "description": "Filter users whose registration date is less or than equal to the date passed in. (The date should be in the ISO8601 UTC format YYY-MM-DDThh:mm:ss.SSSZ) ",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2024-01-01T00:00:00.000Z"
          },
          {
            "name": "partnerId",
            "in": "header",
            "description": "Partner Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "header",
            "description": "Client Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientSecret",
            "in": "header",
            "description": "Client Secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of user objects matching the query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authorization error e.g. due to an invalid or missing API keys."
          },
          "500": {
            "description": "Internal error. \nPossible error codes \n1. **INTERNAL_SERVER_ERROR**",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponseDto": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Error code"
          },
          "error_message": {
            "type": "string",
            "description": "A verbose error message"
          }
        },
        "description": "Error response."
      },
      "AddressDto": {
        "type": "object",
        "properties": {
          "addressLine1": {
            "type": "string",
            "description": "Street Address Line 1"
          },
          "addressLine2": {
            "type": "string",
            "description": "Street Address Line 2"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "state": {
            "type": "string",
            "description": "2 Letter State Code"
          },
          "country": {
            "type": "string",
            "description": "2 Letter Country Code"
          },
          "zip": {
            "type": "string",
            "description": "Zip"
          }
        },
        "description": "Address"
      },
      "UserDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Id for the user"
          },
          "firstName": {
            "type": "string",
            "description": "User's first name"
          },
          "lastName": {
            "type": "string",
            "description": "User's last name"
          },
          "email": {
            "type": "string",
            "description": "User's email address"
          },
          "phone": {
            "type": "string",
            "description": "User's cell phone number"
          },
          "adminNote": {
            "type": "string",
            "description": "Internal admin note"
          },
          "customField1": {
            "type": "string",
            "description": "Custom Field 1"
          },
          "customField2": {
            "type": "string",
            "description": "Custom Field 2"
          },
          "customField3": {
            "type": "string",
            "description": "Custom Field 3"
          },
          "customField4": {
            "type": "string",
            "description": "Custom Field 4"
          },
          "customField5": {
            "type": "string",
            "description": "Custom Field 5"
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          },
          "tosAnswer": {
            "type": "string",
            "description": "User's answer to terms of service for sharing data with Partner. (Only valid for certain partners)",
            "enum": [
              "None",
              "Accepted",
              "Declined"
            ]
          },
          "partnerCode": {
            "type": "string",
            "description": "A code generated for the user to share  with Partner. (Only valid for certain partners)"
          },
          "dateRegistered": {
            "type": "string",
            "description": "Time at which user was registered on the system"
          },
          "updated": {
            "type": "string",
            "description": "Last updated timestamp"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "phoneVerified": {
            "type": "boolean"
          },
          "fraud": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 149,
      "2": 36,
      "3": 236,
      "4": 14,
      "5": 67,
      "6": 148,
      "7": 138,
      "8": 212,
      "9": 48,
      "10": 246,
      "11": 30
    }
  }
}
```