コンテンツにスキップ
commentor API
Esc
↑↓移動↵開く⌘Jプレビュー

題名を変える

題名を変える。前後の空白は除き、200 文字で切る。空の文字列を送ると題名は空になる。

PATCH/api/reviews/{reviewId}/title
Authorization
AuthorizationBearer token · headerrequired

管理用トークン。題名・タグ・アーカイブ・共有先を変える、文書を削除するのに使う。

or
AuthorizationBearer token · headerrequired

本人用の個人トークン。発行時に選んだ範囲の操作を、本人の名義で行う。読み取りと本人のトークン操作は、範囲を問わず使える。

Path parameters
reviewIdstringrequired

文書の ID。文書の URL /reviews/<reviewId> の末尾と同じ。

Request body
requiredapplication/json
titlestringrequired
Responses
200

変えた。

reviewManagedReview

管理の操作の応答。本文とコメントは含まない。

Show properties
reviewIdstring
titlestring
tagsstring[]
archivedTsinteger | null

アーカイブした時刻(UNIX 時間のミリ秒)。アーカイブしていなければ null。

accessModestring
Allowed:linkrestricted
allowedUsersobject[]

招待した人。

Show properties
Array of object
emailstring
rolestring
Allowed:editorviewer
401

トークンが無いか、この文書を読む権限が無い。

errorstringrequired

エラーの種類を表す短いコード。対処を分けるときはこの値を見る。

statusintegerrequired

HTTP ステータスと同じ値。

currentRevisioninteger

409 comments revision conflict のとき、文書の今の commentsRevision。

latestVersionIdstring

409 stale_target_version のとき、文書の最新版の ID。

403

このトークンでは使えない操作か、対象に対する権限が無い。使えるトークンは各操作の Authorization の欄を見る。

errorstringrequired

エラーの種類を表す短いコード。対処を分けるときはこの値を見る。

statusintegerrequired

HTTP ステータスと同じ値。

currentRevisioninteger

409 comments revision conflict のとき、文書の今の commentsRevision。

latestVersionIdstring

409 stale_target_version のとき、文書の最新版の ID。

Request
curl -X PATCH 'https://comment-review.fsmarketing.workers.dev/api/reviews/review_example01/title' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "料金ページ(第 2 稿)"
}'
Response
{
  "review": {
    "reviewId": "string",
    "title": "string",
    "tags": [
      "string"
    ],
    "archivedTs": 0,
    "accessMode": "link",
    "allowedUsers": [
      {
        "email": "string",
        "role": "editor"
      }
    ]
  }
}