> ## 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/ja/account/security)で確認できます。
</ParamField>

共有の削除は共有リンクを取り消します。それ以降、リンクは `404` を返しますが、ファイル自体は保持されます。`blob:write` スコープが必要です。

<ParamField body="id" type="string" required>
  共有 id。[共有の作成](/ja/blob-reference/endpoint/shares-create)または[共有の一覧](/ja/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  | リンクが存在しない、期限切れ、またはすでに取り消されている。 |
