Skip to main content
PUT
/
api
/
user
/
institutionJoin
Join an institution
curl --request PUT \
  --url https://pria.praxislxp.com/api/user/institutionJoin \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "institution": "60d5ec49f1b2c72b9c8e4d3a",
  "referrer": "60d5ec49f1b2c72b9c8e4d3b"
}
'
{
  "success": true,
  "ui": {
    "_id": "<string>",
    "user": "<string>",
    "institution": "<string>",
    "accountType": "super",
    "referrer": "<string>",
    "status": "active",
    "creditAwarded": 123,
    "creditAwardedDate": "2023-11-07T05:31:56Z"
  },
  "message": "Joined successfully"
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
institution
string
required

The institution ObjectId to join

Example:

"60d5ec49f1b2c72b9c8e4d3a"

referrer
string
required

The referrer user ObjectId. If different from the current user, the membership is set to pending and requires approval.

Example:

"60d5ec49f1b2c72b9c8e4d3b"

Response

Joined successfully or membership already exists

success
boolean
Example:

true

ui
object

The created or existing UserInstitution document

message
string
Example:

"Joined successfully"