---
title: "チェックインの編集"
method: PATCH
path: "/v1/checkins/{id}"
tags: ["checkin"]
---

# チェックインの編集

`PATCH /v1/checkins/{id}`

指定したIDのチェックインの情報を編集します。
リクエスト内の項目は全て省略可能であり、更新したい項目のみを送信することができます。

## Path parameters

- `id` integer, required

## Request body

- UpdateCheckin
  - `checked_in_at` string, date-time — チェックイン日時
  - `tags` string[] — タグ
  - `link` string — オカズリンク (http, https)
  - `note` string — ノート
  - `is_private` boolean — 非公開チェックインとして設定
  - `is_too_sensitive` boolean — チェックイン対象のオカズをより過激なオカズとして設定
  - `discard_elapsed_time` boolean — 前回チェックインからの経過時間を記録しない

## Response `200`

成功

- Checkin — チェックインデータ
  - `id` integer — チェックインID
  - `checked_in_at` string, date-time — チェックイン日時
  - `tags` string[] — タグ
  - `link` string — オカズリンク (http, https)
  - `note` string — ノート
  - `is_private` boolean — 非公開チェックインとして設定
  - `is_too_sensitive` boolean — チェックイン対象のオカズをより過激なオカズとして設定
  - `discard_elapsed_time` boolean — 前回チェックインからの経過時間を記録しない
  - `source` 'web' | 'csv' | 'webhook' | 'api' — チェックインの登録元
  - `user` User — ユーザーデータ
    - `name` string, required — ユーザー名 (多くの画面では先頭に @ を付けて表示されますが、ここでは含まれません)
    - `display_name` string, required — 名前
    - `is_protected` boolean, required — チェックイン履歴の非公開フラグ
    - `private_likes` boolean, required — いいね一覧の非公開フラグ
    - `bio` string — 自己紹介文
    - `url` string, uri — プロフィール上に掲載するURL
    - `checkin_summary` CheckinSummary — チェックインの概況
      - `current_session_elapsed` integer, required — 最後のチェックインからの経過秒数 (現在のセッション)
      - `total_checkins` integer, required — 合計チェックイン回数
      - `total_times` integer, required — 合計時間 (秒)
      - `average_interval` integer, required — チェックイン間隔の平均値 (秒)
      - `median_interval` integer, required — チェックイン間隔の中央値 (秒)
      - `longest_interval` integer, required — チェックイン間隔の最大値 (秒)
      - `shortest_interval` integer, required — チェックイン間隔の最小値 (秒)

## Other responses

- `403` — 自分以外のチェックインに対して操作を試みた場合
- `404` — 存在しない場合
- `422` — バリデーションエラー

## Changes

- **2025-05-24** `6c71d69e3250` — 1 info
  - added the optional property `user` to the response with the `200` status
- **2025-05-23** `898e9ea9eb32` — 1 warning
  - removed the optional property `user` from the response with the `200` status
- **2025-04-05** `462d5bb516c9` — 1 info
  - added the optional property `user` to the response with the `200` status
- **2021-08-10** `f1b4c8c15f87` — 1 info
  - added the optional property `source` to the response with the `200` status
- **2021-08-08** `6b9e98e5e4b5` — 1 breaking, 2 info
  - the `error/violations/items/` response's property type/format changed from `string`/`` to `object`/`` for status `422`
  - added the required property `error/violations/items/field` to the response with the `422` status
  - added the required property `error/violations/items/message` to the response with the `422` status

[Full history](https://skmtc.dev/shikorism/apis/tissue-api/changes/v1/checkins/:id/patch.md)

---

[API](https://skmtc.dev/shikorism/apis/tissue-api.md) · [All operations](https://skmtc.dev/shikorism/apis/tissue-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/shikorism/tissue-api/revisions/ba4127ea2b1b/schema)
