Content Management API > Collaborator
Update a collaborator
Body parameters
is_active boolean Optional
Whether the user is active or not
Returns
Returns a resource object of type user
Examples
import { buildClient } from "@datocms/cma-client-node";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const userId = "312";
const user = await client.users.update(userId, { id: "312" });
// Check the 'Returned output' tab for the result ☝️ console.log(user);}
run();{ id: "312", email: "mark.smith@example.com", is_2fa_active: true, full_name: "Mark Smith", is_active: true, role: { type: "role", id: "34" },}