Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Collaborator

Delete a collaborator

Query parameters

destination_user_type enum

New owner for resources previously owned by the deleted user. This argument specifies the new owner type.

Example: "user"
account
user
access_token
sso_user
destination_user_id string

New owner for resources previously owned by the deleted user. This argument specifies the new owner ID.

Example: "7865"

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.destroy(userId);
// 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" },
}