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

# Publish an asset

Craft Cross CMSのアセットを公開します。

#### Required Scope
APIの実行に必要なScopeです。
```
beta.cms.asset.publish
```

#### Required Role
管理画面でScopeを追加する際に必要な権限です。
```
Craft Cross CMS > メディアライブラリの編集
```


# 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": "CMS Management"
  },
  "paths": {
    "/v2beta/cms/asset/publish": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Publish an asset",
        "description": "Craft Cross CMSのアセットを公開します。\n\n#### Required Scope\nAPIの実行に必要なScopeです。\n```\nbeta.cms.asset.publish\n```\n\n#### Required Role\n管理画面でScopeを追加する際に必要な権限です。\n```\nCraft Cross CMS > メディアライブラリの編集\n```\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assetId": {
                    "type": "string",
                    "description": "アセットのID"
                  }
                },
                "required": [
                  "assetId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. CMS Management API 400 responses include a non-empty detail.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/CmsBadRequestProblemDetail"
                }
              }
            }
          }
        },
        "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"
      }
    },
    "schemas": {
      "Asset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "アセットID"
          },
          "sys": {
            "type": "object",
            "properties": {
              "createdAt": {
                "type": "string",
                "description": "アセットの作成日時"
              },
              "createdBy": {
                "type": "string",
                "description": "アセット作成者のアカウントID"
              },
              "updatedAt": {
                "type": "string",
                "description": "アセットの更新日時"
              },
              "updatedBy": {
                "type": "string",
                "description": "アセットの更新者のアカウントID"
              },
              "publishedAt": {
                "type": "string",
                "nullable": true,
                "description": "アセットの公開日時"
              }
            },
            "required": [
              "createdAt",
              "createdBy",
              "updatedAt",
              "updatedBy"
            ],
            "additionalProperties": false
          },
          "title": {
            "type": "string",
            "description": "アセットのタイトル"
          },
          "description": {
            "type": "string",
            "description": "アセットの説明"
          },
          "altText": {
            "type": "string",
            "description": "アセットの代替テキスト"
          },
          "tagIds": {
            "type": "array",
            "description": "アセットに紐づくタグのIDリスト",
            "items": {
              "type": "string"
            }
          },
          "file": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "ファイル名"
              },
              "mimeType": {
                "type": "string",
                "description": "ファイルのMIMEタイプ"
              },
              "src": {
                "type": "string",
                "description": "アセットのソースURL"
              },
              "size": {
                "type": "number",
                "description": "ファイルサイズ（バイト）"
              },
              "width": {
                "type": "number",
                "description": "画像の幅（画像の場合）"
              },
              "height": {
                "type": "number",
                "description": "画像の高さ（画像の場合）"
              }
            },
            "required": [
              "name",
              "mimeType",
              "src",
              "size"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "sys",
          "title",
          "description",
          "altText",
          "tagIds",
          "file"
        ],
        "additionalProperties": false
      },
      "CmsBadRequestProblemDetail": {
        "description": "RFC 9457 Problem Details returned when the CMS request is invalid.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "https://api.karte.io/errors/bad-request"
            ]
          },
          "title": {
            "type": "string",
            "enum": [
              "Bad Request"
            ]
          },
          "status": {
            "type": "integer",
            "enum": [
              400
            ]
          },
          "detail": {
            "type": "string",
            "minLength": 1
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "additionalProperties": false
      }
    }
  },
  "x-explorer-enabled": false
}
````