Show examples in:
Delete a collaborator

Query parameters

destination_user_type  Optional  enum  Example: "user"

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

destination_user_id  Optional  string  Example: "7865"

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

Returns

Returns a user resource object.

Examples

Example Basic example
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.destroy(userId);
console.log(user);
}
run();