Skip to main content
POST
/
api
/
user
/
setting
Create a new instance variable
curl --request POST \
  --url https://pria.praxislxp.com/api/user/setting \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "variable-4",
  "value": "the value",
  "admin_only": true,
  "editable_others": true,
  "institution_shared": true
}'
{
  "success": true,
  "data": {
    "_id": "687e71b293c797174458e6f2",
    "key": "variable-4",
    "value": "the value",
    "institution": "6631915765bb0a94cfd6ca99",
    "user": "6430d02554cd4e00403e8b05",
    "status": "active",
    "admin_only": true,
    "institution_shared": true,
    "editable_others": true
  },
  "message": "Setting created!"
}

Authorizations

Authorization
string
header
required

JWT token passed in x-access-token header

Body

application/json
key
string
required

Setting key name

Example:

"variable-4"

value
string
required

Setting value

Example:

"the value"

admin_only
boolean

Whether setting is admin-only

Example:

true

editable_others
boolean

Whether setting can be edited by others

Example:

true

institution_shared
boolean

Whether setting is shared across institution

Example:

true

Response

Setting successfully created

success
boolean

Whether the operation was successful

Example:

true

data
object
message
string

Success message

Example:

"Setting created!"