LemursEye
Documentation
API

Suspend or reactivate a user

PUThttps://lemurseye.com/api/v1/users/{id}/status

enabled: 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

  • idstringrequired

    The user's id.

Body (JSON)

  • enabledbooleanrequired

    false to suspend, true to reactivate.

Response

200

The person, with enabled updated.

Response fields

  • idstring

    The user's id.

  • emailstring

    Their sign-in email.

  • namestring | null

    Full name.

  • enabledboolean

    false when suspended: they cannot sign in.

  • pendingPasswordboolean

    true until they accept the invitation and choose a password.

  • rolesstring[]

    Their roles in your company: owner, manager, viewer, installer.

  • lastSeenAttimestamp | null

    Their 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 yourself

    The 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.