---
title: "ブロックの更新"
---

> Documentation Index
> Fetch the complete documentation index at: https://apidocs.cs-cart.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# ブロックの更新

<span class="api-method api-method-put">`PUT`</span> `/blocks/{BLOCK_ID}`

指定されたブロックを更新するには、`/api/blocks/{BLOCK_ID}`に対してPOSTを送信します。 `{BLOCK_ID}`は、ブロックのIDです。

## リクエスト：ヘッダー

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Basic <認証情報>`     |

> **認証情報について**
>
> 認証情報は、ユーザーのEメールアドレスとAPIキーをコロンで連結したものをBase64エンコードしたものです。

## PATH パラメータ

| Name       | Type    | 説明      |
| ---------- | ------- | ------- |
| `BLOCK_ID` | integer | ブロックのID |

## リクエスト：ボディ

| Name         | Type               | 必須 | 説明         |
| ------------ | ------------------ | -- | ---------- |
| `type`       | string             | 必須 | ブロックのタイプ   |
| `name`       | string             | 必須 | ブロックの名前    |
| `properties` | array\_of\_strings |    | ブロックのプロパティ |
| `content`    | string             |    | ブロックのコンテンツ |

## レスポンス

### 200

```json
{
  "type": "template",
  "name": "Example Template 2",
  "properties": {
    "template": "blocks/static_templates/my_account_links.tpl"
  }
}
```

### 400

```json
{}
```

Source: https://apidocs.cs-cart.jp/blocks/api-block-update/index.mdx
