---
updatedAt: 2026-04-27T13:22:54.000Z
agentTools:
  projectIndex: https://developers.karte.io/llms.txt
---

# Invalidate Craft Sites content

Craft SitesのコンテンツのCDNキャッシュを削除します。キャッシュ削除には数分かかる場合があります。

#### Required Scope
APIの実行に必要なScopeです。
```
beta.craft.sites.content.invalidate
```

#### Required Role
管理画面でScopeを追加する際に必要な権限です。
```
Craft > Craft 設定の編集
```


# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.karte.io",
      "description": "Production server"
    },
    {
      "url": "https://api-jp.karte.io",
      "description": "Production JP server. リージョン固定オプションのプロジェクトはこちらのエンドポイントを利用してください."
    }
  ],
  "info": {
    "version": "2.0.0",
    "title": "Craft"
  },
  "paths": {
    "/v2beta/craft/sites/content/invalidate": {
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Invalidate Craft Sites content",
        "description": "Craft SitesのコンテンツのCDNキャッシュを削除します。キャッシュ削除には数分かかる場合があります。\n\n#### Required Scope\nAPIの実行に必要なScopeです。\n```\nbeta.craft.sites.content.invalidate\n```\n\n#### Required Role\n管理画面でScopeを追加する際に必要な権限です。\n```\nCraft > Craft 設定の編集\n```\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "siteName",
                  "pathPattern"
                ],
                "properties": {
                  "siteName": {
                    "type": "string",
                    "example": "my-web-site"
                  },
                  "pathPattern": {
                    "type": "string",
                    "example": "/dir/index.html",
                    "pattern": "^/.*$",
                    "description": "キャッシュ削除対象をパスパターンとして指定します。\n\n- `/` から始まるパスを指定します。\n    - 例: `/dir/index.html` のキャッシュを削除する場合は `/dir/index.html` を指定します。\n- `*` は `/` に続く最後の文字として使用できます。それ以外の場合は使用できません。\n    - `/*` は `/` に続く全ての文字列を対象とします。\n    - 例: `/dir/*` は `/dir/` 以下の全てのコンテンツを対象とします。\n"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-karte-api",
            "schema": {
              "type": "string"
            },
            "description": "今後利用する可能性のある予約語です。現在は設定不要です。"
          },
          {
            "in": "header",
            "name": "authorization",
            "schema": {
              "type": "string"
            },
            "description": "認証情報を含むトークンです。\"Authorization\" ヘッダーに `Bearer <token>` の形式で設定してください。"
          },
          {
            "in": "header",
            "name": "content-type",
            "schema": {
              "type": "string"
            },
            "description": "リクエストのコンテンツタイプを指定します。通常は `application/json` を使用してください。"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-explorer-enabled": false
}
````