Set User's Status Active
    • Dark
      Light
    • PDF

    Set User's Status Active

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/users.setActiveStatus

    Permissions required:

    • edit-other-user-active-status
    • manage-moderation-actions

    Changelog

    VersionDescription
    3.7.0Added confirmRelinquish to the payload.
    0.75.0Added
    Header parameters
    X-User-Id
    stringRequired

    The authenticated user ID.

    ExamplerbAXPnMktTFbNpwtJ
    X-Auth-Token
    stringRequired

    The authenticated user token.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    Body parameters

    If activeStatus=false & confirmRelinquish=true and the user is the last remaining owner of a room, the oldest member of that room will be chosen as the new owner.

    object
    activeStatus
    boolean Required

    The value of the active status.

    Default"True"
    userId
    string Required

    The user ID whose status value is to be changed.

    Example5HmCfpoB7jp2uibTC
    confirmRelinquish
    boolean

    Allows the user to be deactivated even if it is the last owner of a room. If activeStatus=false & confirmRelinquish=true and the user is the last remaining owner of a room, the oldest member of that room will be chosen as the new owner.

    Default"False"
    Responses
    200
    Success Example
    {
      "user": {
        "_id": "jJNyu4BQFqdgEcqnR",
        "active": false
      },
      "success": true
    }
    Expand All
    object
    user
    object
    _id
    string
    active
    boolean
    success
    boolean
    400

    Bad Request

    Example 1
    {
      "success": false,
      "error": "must have required property 'activeStatus'\n[invalid-params]",
      "errorType": "invalid-params"
    }
    object
    success
    boolean
    error
    string
    errorType
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.