Claude Platform Docs

Delete User Profile

$client->beta->userProfiles->delete(string userProfileID, ?list<AnthropicBeta> betas, ?string workspaceID): BetaDeletedUserProfile
DELETE/v1/user_profiles/{user_profile_id}

Delete User Profile

Parameters
userProfileID: string⁠Path parameter

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

betas?:optional list<AnthropicBeta>⁠Header parameter

Optional header to specify the beta version(s) you want to use.

workspaceID?:optional 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
class BetaDeletedUserProfile { $type = 'user_profile_deleted'; $id; }
"user_profile_deleted" type

Object type. Always user_profile_deleted.

string id

Identifier of the deleted user profile, prefixed uprof_.

Delete User Profile
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaDeletedUserProfile = $client->beta->userProfiles->delete(
  'uprof_011CZkZCu8hGbp5mYRQgUmz9',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($betaDeletedUserProfile);
Returns Examples
Response 200
{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "type": "user_profile_deleted"
}