Whether the user is active or not
Role
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const userId = '312';const user = await client.users.update(userId, {is_active: true,role: {type: 'role',id: '34'}});console.log(user);}run();
{id: '312',email: 'mark.smith@example.com',is_2fa_active: true,full_name: 'Mark Smith',is_active: true,meta: {last_access: '2018-03-25T21:50:24.914Z'},role: {type: 'role',id: '34'}}