Claude Platform Docs

파일 삭제

$client->files->delete(string fileID, ?string workspaceID): DeletedFile
DELETE/v1/files/{file_id}

파일 삭제

Parameters
fileID: string

ID of the File.

workspaceID?:optional string
Returns
class DeletedFile { $type; $id; }
?Type type

Deleted object type.

For file deletion, this is always "file_deleted".

string id

ID of the deleted file.

파일 삭제
<?php

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

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

$deletedFile = $client->files->delete(
  'file_id', workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy'
);

var_dump($deletedFile);
Returns Examples
Response 200
{
  "id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "type": "file_deleted"
}