---
title: "Publish a content"
method: POST
path: "/v2beta/cms/content/publish"
tags: ["Contents"]
---

# Publish a content

`POST /v2beta/cms/content/publish`

## Request

- Base URL: `https://api.karte.io`
- URL: `https://api.karte.io/v2beta/cms/content/publish`
- Auth: HTTP bearer

Craft Cross CMSのコンテンツを公開します。

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

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

## Headers

- `x-karte-api` string
- `authorization` string
- `content-type` string

## Request body

- object
  - `modelId` string, required: コンテンツが所属するモデルのID
  - `contentId` string, required: コンテンツのID
  - `kickHookV2` boolean: この操作でHook V2のトリガーを発火するかどうか。（[参照](https://developers.karte.io/reference/hook-v2-karte-craft-channel)）

## Response `200`

A successful response.

- Content: コンテンツの情報を表します。
  - `id` string, required: コンテンツのIDです。
  - `sys` SysData: システム側で自動で設定された情報が入ります。 sys.customOrderには、管理画面にてコンテンツの手動並び替えを行った際の順序値（Number型）が入ります。
    - `customOrder` integer
    - `modelId` string
    - `ownerId` string
    - `raw` RawData: コンテンツの生データを表します。
      - `createdAt` string: コンテンツの作成日時です。
      - `createdBy` string: コンテンツの作成者です。
      - `updatedAt` string: コンテンツの更新日時です。
      - `updatedBy` string: コンテンツの更新者です。
      - `firstPublishedAt` string, nullable: コンテンツの初回公開日時です。
      - `publishedAt` string, nullable: コンテンツの公開日時です。
      - `contentId` string: コンテンツのIDです。
      - `revisionId` string: コンテンツのリビジョンIDです。
      - `publishedRevisionId` string, nullable: コンテンツの公開済リビジョンIDです。

## Other responses

- `400`: Bad Request. CMS Management API 400 responses include a non-empty detail.

---

[API](https://skmtc.dev/karte/apis/cms-management.md) - [All operations](https://skmtc.dev/karte/apis/cms-management/llms.txt) - [OpenAPI document](https://skmtc.dev/karte/apis/cms-management/revisions/275f2d6496ec?raw)
