---
title: "删除 File"
method: DELETE
path: "/agent/managed/v1/files/{fileId}"
tags: ["Managed Agents - File"]
---

# 删除 File

`DELETE /agent/managed/v1/files/{fileId}`

## Request

- Base URL: `https://agent-api.bigmodel.cn/api`
- URL: `https://agent-api.bigmodel.cn/api/agent/managed/v1/files/{fileId}`
- Auth: HTTP bearer

删除指定 File。已被引用或不满足删除条件时会返回相应错误；不存在或无权限时返回 404。

## Path parameters

- `fileId` string, required

## Headers

- `zai-version` '2026-05-26', required
- `zai-beta` string, required

## Response `200`

请求成功。

- ManagedFileDeleted
  - `id` string, required
  - `type` 'file_deleted', required

## Other responses

- `default`: 请求失败。

## Changes

- **2026-11-03** `7fd61aa7f811`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bigmodel/apis/zhipu-ai-api/changes/agent/managed/v1/files/:fileId/delete.md)

---

[API](https://skmtc.dev/bigmodel/apis/zhipu-ai-api.md) - [All operations](https://skmtc.dev/bigmodel/apis/zhipu-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bigmodel/apis/zhipu-ai-api/revisions/f2be7c0fcbb9?raw)
