Claude Platform Docs

删除用户配置文件

client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfile
DELETE/v1/user_profiles/{user_profile_id}

删除用户配置文件

Parameters
userProfileID: string⁠Path parameter

The ID of the user profile to delete (uprof_...).

params: UserProfileDeleteParams { workspace_id }
workspace_id?: string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
interface DeletedUserProfile { type: "user_profile_deleted"; id }
type: "user_profile_deleted"

Object type. Always user_profile_deleted.

id: string

Identifier of the deleted user profile, prefixed uprof_.

删除用户配置文件
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

const deletedUserProfile = await client.userProfiles.delete("uprof_011CZkZCu8hGbp5mYRQgUmz9");

console.log(deletedUserProfile.id);
Returns Examples
Response 200
{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "type": "user_profile_deleted"
}