> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Blob 删除分享

> 通过 DELETE /v1/shares 撤销分享链接。链接立即失效；文件本身会被保留。

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  你账户的 API 密钥。你可以在[账户设置](https://squarecloud.app/zh/account/security)中找到它。
</ParamField>

删除分享会撤销一个分享链接。此后该链接返回 `404`，文件本身会被保留。需要 `blob:write` scope。

<ParamField body="id" type="string" required>
  分享 id，来自[创建分享](/zh/blob-reference/endpoint/shares-create)或[分享列表](/zh/blob-reference/endpoint/shares-list)。
</ParamField>

### 响应

<ResponseField name="status" type="string">
  成功为 "success"，否则为 "error"。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://blob.squarecloud.app/v1/shares' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{ "id": "q8Zr2LwX7nT0vKc4Hs1YbA" }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success"
  }
  ```
</ResponseExample>

### 错误

| 代码                | HTTP | 触发情况            |
| ----------------- | ---- | --------------- |
| `INVALID_SHARE`   | 400  | `id` 缺失或格式错误。   |
| `SHARE_NOT_FOUND` | 404  | 链接不存在、已过期或已被撤销。 |
