Suspend or reactivate a user
https://lemurseye.com/api/v1/users/{id}/statusenabled: false suspends the person: they are signed out everywhere at once and cannot sign in. enabled: true lets them back in, with their roles as they were.
You cannot suspend yourself, nor the company's last active owner.
Permission: users:write (a person only, never an API key). The token is sent as Authorization: Bearer <token>; see Authentication.
Path parameters
idstringrequiredThe user's id.
Body (JSON)
enabledbooleanrequiredfalseto suspend,trueto reactivate.
Response
200 The person, with enabled updated.
Response fields
idstringThe user's id.
emailstringTheir sign-in email.
namestring | nullFull name.
enabledbooleanfalsewhen suspended: they cannot sign in.pendingPasswordbooleantrueuntil they accept the invitation and choose a password.rolesstring[]Their roles in your company:
owner,manager,viewer,installer.lastSeenAttimestamp | nullTheir last activity, or null if they have never signed in.
Errors
A refusal by the rules comes back as { "error": "...", "code": "..." }: branch on code, show error. Where no message is listed, only the status code is returned.
- 404
No user with this id in your company.
- 400
The body has no
enabled. - 403
selfyou cannot suspend yourselfThe id is your own.
- 409
last_ownerThis is the company's only active owner. Make someone else owner first, so the company is never left without one.They are the last active owner.
- 401
No token, or it has expired.
- 403
The token lacks the permission above.