Skip to content
Get started

Reactivate a user

client.viewer.users.reactivate(UserReactivateParams { userId } body, RequestOptionsoptions?): UserReactivateResponse { success, message }
post/v1/viewer/users/reactivate

Restores access for a previously deactivated user. The user will regain their original permissions and be able to log in again.

ParametersExpand Collapse
body: UserReactivateParams { userId }
userId: string

User ID to reactivate. Format: usr_{32-hex-chars}

ReturnsExpand Collapse
UserReactivateResponse { success, message }

Response for reactivating a user in Viewer

success: boolean
message?: string
Reactivate a user
import Avara from 'avara';

const client = new Avara({
  apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted
});

const response = await client.viewer.users.reactivate({ userId: 'usr_1234567890abcdef1234567890abcdef' });

console.log(response.success);
{
  "success": true,
  "message": "User reactivated successfully"
}
Returns Examples
{
  "success": true,
  "message": "User reactivated successfully"
}