Skip to main content
POST
/
api
/
admin
/
userInstitutions
/
eligible
Get users eligible to enroll in an institution
curl --request POST \
  --url https://pria.praxislxp.com/api/admin/userInstitutions/eligible \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "institution": "67826dfe5d387207aabd6fc1",
  "search": "john"
}
'
{
  "success": true,
  "data": [
    {
      "user": {
        "_id": "67826dfe5d387207aabd6fc1",
        "fname": "John",
        "lname": "Doe",
        "email": "john@example.com",
        "accountType": "user"
      },
      "institutions": [
        {
          "_id": "<string>",
          "name": "<string>"
        }
      ]
    }
  ],
  "total": 42
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
institution
string
required

Institution ID to find eligible users for

Example:

"67826dfe5d387207aabd6fc1"

Optional search term to filter by name or email (2+ characters)

Example:

"john"

Response

Successfully retrieved eligible users

success
boolean
Example:

true

data
object[]

List of eligible users (max 100)

total
integer

Total number of eligible users before capping

Example:

42