We are launching all new Klivolks 3.0See what is new

Users

Create, read, suspend and reactivate users through the API.

Users are the people KPass authenticates for your apps. Each user has a Reference Id — your own identifier for that person in your system — which is what every api/v1 endpoint uses to address a user, never KPass's own internal id.

Create a user — referenceId is your own id for this person; userType/userRole are group ids from the User Groups catalog:

curl -X POST https://kpass.one/api/v1/users \
  -H "X-Client-Id: YOUR_CLIENT_ID" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceId": "your-own-user-id",
    "userName": "jane.doe",
    "email": "[email protected]",
    "password": "a-temporary-password",
    "userType": "USER_TYPE_GROUP_ID",
    "userRole": "USER_ROLE_GROUP_ID"
  }'

Get a user by your referenceId:

curl https://kpass.one/api/v1/users/YOUR_REFERENCE_ID \
  -H "X-Client-Id: YOUR_CLIENT_ID" \
  -H "X-Api-Secret: YOUR_API_SECRET"

Suspend or reactivate a user:

curl -X PUT https://kpass.one/api/v1/users/YOUR_REFERENCE_ID/status \
  -H "X-Client-Id: YOUR_CLIENT_ID" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "status": "suspended" }'