{"openapi":"3.1.0","info":{"title":"FixDay API","version":"1.0.0","summary":"日程調整 FixDay の公開 API（v1）","description":"予約データを外部システムから読み書きするための HTTP API。日時はすべて epoch ミリ秒（UTC）。 v1 では返している項目を削ったり意味を変えたりしない（項目は増えることがあるので、知らないキーは無視する）。 人向けの説明: https://fixday.app/developers","contact":{"name":"FixDay お問い合わせ","url":"https://fixday.app/contact"}},"servers":[{"url":"https://fixday.app/api/v1","description":"本番"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"event-types","description":"調整ページ"},{"name":"bookings","description":"予約"}],"paths":{"/event-types":{"get":{"operationId":"listEventTypes","tags":["event-types"],"summary":"公開中の調整ページの一覧","description":"公開中（status=active）の調整ページを最大 100 件返す。社内メモは含まない。","responses":{"200":{"description":"成功","headers":{"X-RateLimit-Limit":{"description":"1 分あたりの上限","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"残りの回数","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"枠が戻る時刻（epoch 秒）","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["eventTypes"],"properties":{"eventTypes":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}}},"example":{"eventTypes":[{"id":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","slug":"30min","title":"30分のオンライン相談","description":"サービスの導入についてのご相談を承ります。","durationMinutes":30,"status":"active","folderId":null,"createdAt":1790000000000,"updatedAt":1790500000000}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/event-types/{id}/slots":{"get":{"operationId":"listSlots","tags":["event-types"],"summary":"空き枠の取得","description":"調整ページの設定（受付時間・カレンダーの予定・上限など）を反映した、予約できる枠を返す。 対象期間は調整ページの「予約を受け付ける期間（今日から何日先まで）」の範囲で、from / to はその中をさらに絞り込む。","parameters":[{"name":"id","in":"path","required":true,"description":"調整ページの ID","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"この時刻以降に始まる枠だけ（epoch ミリ秒）","schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","required":false,"description":"この時刻より前に始まる枠だけ（epoch ミリ秒）","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"成功","headers":{"X-RateLimit-Limit":{"description":"1 分あたりの上限","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"残りの回数","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"枠が戻る時刻（epoch 秒）","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotList"},"example":{"eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","timezone":"Asia/Tokyo","durationMinutes":30,"slots":[{"start":1791442800000,"end":1791444600000},{"start":1791444600000,"end":1791446400000}],"unavailableHostCount":0}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/bookings":{"get":{"operationId":"listBookings","tags":["bookings"],"summary":"予約の一覧（開始日時の新しい順）","description":"limit（既定 50・最大 100）と offset で分割して取得する。 次のページがあるかは hasMore で判断する（総件数は返さない）。","parameters":[{"name":"from","in":"query","required":false,"description":"開始日時がこの時刻以降（epoch ミリ秒）","schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","required":false,"description":"開始日時がこの時刻以前（epoch ミリ秒）","schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","required":false,"description":"予約の状態で絞り込む","schema":{"type":"string","enum":["pending","confirmed","cancelled","rescheduled","failed","no_show"]}},{"name":"eventTypeId","in":"query","required":false,"description":"調整ページで絞り込む","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"件数（1〜100。範囲外は丸める）","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","required":false,"description":"読み飛ばす件数","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"成功","headers":{"X-RateLimit-Limit":{"description":"1 分あたりの上限","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"残りの回数","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"枠が戻る時刻（epoch 秒）","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingList"},"example":{"bookings":[{"id":"01JB2Y7Q8M3K4N5P6R7S8T9V0W","eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","status":"confirmed","startAt":1791442800000,"endAt":1791444600000,"guestTimezone":"Asia/Tokyo","guestName":"予約 一郎","guestEmail":"ichiro@example.com","guestPhone":null,"meetingUrl":"https://meet.google.com/abc-defg-hij","source":"public","cancelReason":null,"cancelledAt":null,"createdAt":1791100000000,"updatedAt":1791100000000}],"hasMore":false,"limit":50,"offset":0}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/bookings/{id}":{"get":{"operationId":"getBooking","tags":["bookings"],"summary":"予約の明細（予約時の質問への回答を含む）","parameters":[{"name":"id","in":"path","required":true,"description":"予約の ID","schema":{"type":"string"}}],"responses":{"200":{"description":"成功","headers":{"X-RateLimit-Limit":{"description":"1 分あたりの上限","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"残りの回数","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"枠が戻る時刻（epoch 秒）","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["booking"],"properties":{"booking":{"$ref":"#/components/schemas/BookingDetail"}}},"example":{"booking":{"id":"01JB2Y7Q8M3K4N5P6R7S8T9V0W","eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","status":"confirmed","startAt":1791442800000,"endAt":1791444600000,"guestTimezone":"Asia/Tokyo","guestName":"予約 一郎","guestEmail":"ichiro@example.com","guestPhone":null,"meetingUrl":"https://meet.google.com/abc-defg-hij","source":"public","cancelReason":null,"cancelledAt":null,"createdAt":1791100000000,"updatedAt":1791100000000,"answers":[{"label":"会社名","value":"株式会社サンプル"}]}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/bookings/{id}/cancel":{"post":{"operationId":"cancelBooking","tags":["bookings"],"summary":"予約のキャンセル","description":"ゲストにキャンセルのメールが届き、カレンダーの予定も消える。事前決済のある予約は返金の決まりに沿って返金される。 すでにキャンセル済みの予約に対しても ok: true を返す（何度呼んでもよい）。","parameters":[{"name":"id","in":"path","required":true,"description":"予約の ID","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"キャンセルの理由（500 文字まで。超えた分は切り捨て）"}}},"example":{"reason":"先方のご都合によりキャンセル"}}}},"responses":{"200":{"description":"成功","headers":{"X-RateLimit-Limit":{"description":"1 分あたりの上限","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"残りの回数","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"枠が戻る時刻（epoch 秒）","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelResult"},"example":{"ok":true,"orphanedEventCount":0}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"webhooks":{"booking.confirmed":{"post":{"operationId":"webhook_booking_confirmed","summary":"予約が確定した（承認フローのある予約は承認されたとき）","security":[],"description":"管理画面の「外部への通知」で登録した Webhook の URL へ POST する。 X-FixDay-Signature で送信元を確かめ、X-FixDay-Delivery で重複を除くこと（同じ配信が 2 回届くことがある）。 2xx 以外を返すと、間隔を空けて送り直す（最初の送信を含めて最大 5 回）。 ただし FixDay 側で送信待ちに積むこと自体に失敗したイベントは送り直さない（どのイベントも同じ）。","parameters":[{"name":"X-FixDay-Signature","in":"header","required":true,"description":"t=<UNIX 秒>,v1=<HMAC-SHA256 の 16 進>。署名対象は「t の値 + . + 本文」","schema":{"type":"string"}},{"name":"X-FixDay-Event","in":"header","required":true,"description":"イベント名","schema":{"type":"string","enum":["booking.confirmed","booking.rescheduled","booking.cancelled","booking.reminder"]}},{"name":"X-FixDay-Delivery","in":"header","required":true,"description":"配信 ID（再送しても変わらない。本文の id と同じ）","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"},"example":{"id":"01JB2Y9ZQ0DELIVERY00000000","event":"booking.confirmed","occurredAt":1791100000000,"teamId":"01JAT0TEAM000000000000000","teamName":"株式会社サンプル","booking":{"id":"01JB2Y7Q8M3K4N5P6R7S8T9V0W","eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","eventTitle":"30分のオンライン相談","status":"confirmed","approvalState":null,"startAt":1791442800000,"endAt":1791444600000,"timezone":"Asia/Tokyo","guestName":"予約 一郎","guestEmail":"ichiro@example.com","hostNames":["見本 太郎"],"meetingUrl":"https://meet.google.com/abc-defg-hij","manageUrl":"https://fixday.app/b/abcdefghij","cancelReason":null}}}}},"responses":{"200":{"description":"受け取った（2xx なら何でもよい）"}}}},"booking.rescheduled":{"post":{"operationId":"webhook_booking_rescheduled","summary":"予約の日程が変更された","security":[],"description":"管理画面の「外部への通知」で登録した Webhook の URL へ POST する。 X-FixDay-Signature で送信元を確かめ、X-FixDay-Delivery で重複を除くこと（同じ配信が 2 回届くことがある）。 2xx 以外を返すと、間隔を空けて送り直す（最初の送信を含めて最大 5 回）。 ただし FixDay 側で送信待ちに積むこと自体に失敗したイベントは送り直さない（どのイベントも同じ）。","parameters":[{"name":"X-FixDay-Signature","in":"header","required":true,"description":"t=<UNIX 秒>,v1=<HMAC-SHA256 の 16 進>。署名対象は「t の値 + . + 本文」","schema":{"type":"string"}},{"name":"X-FixDay-Event","in":"header","required":true,"description":"イベント名","schema":{"type":"string","enum":["booking.confirmed","booking.rescheduled","booking.cancelled","booking.reminder"]}},{"name":"X-FixDay-Delivery","in":"header","required":true,"description":"配信 ID（再送しても変わらない。本文の id と同じ）","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"},"example":{"id":"01JB2Y9ZQ0DELIVERY00000000","event":"booking.rescheduled","occurredAt":1791100000000,"teamId":"01JAT0TEAM000000000000000","teamName":"株式会社サンプル","booking":{"id":"01JB2Y7Q8M3K4N5P6R7S8T9V0W","eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","eventTitle":"30分のオンライン相談","status":"confirmed","approvalState":null,"startAt":1791442800000,"endAt":1791444600000,"timezone":"Asia/Tokyo","guestName":"予約 一郎","guestEmail":"ichiro@example.com","hostNames":["見本 太郎"],"meetingUrl":"https://meet.google.com/abc-defg-hij","manageUrl":"https://fixday.app/b/abcdefghij","cancelReason":null}}}}},"responses":{"200":{"description":"受け取った（2xx なら何でもよい）"}}}},"booking.cancelled":{"post":{"operationId":"webhook_booking_cancelled","summary":"予約がキャンセルされた（承認の却下・期限切れを含む）","security":[],"description":"管理画面の「外部への通知」で登録した Webhook の URL へ POST する。 X-FixDay-Signature で送信元を確かめ、X-FixDay-Delivery で重複を除くこと（同じ配信が 2 回届くことがある）。 2xx 以外を返すと、間隔を空けて送り直す（最初の送信を含めて最大 5 回）。 ただし FixDay 側で送信待ちに積むこと自体に失敗したイベントは送り直さない（どのイベントも同じ）。","parameters":[{"name":"X-FixDay-Signature","in":"header","required":true,"description":"t=<UNIX 秒>,v1=<HMAC-SHA256 の 16 進>。署名対象は「t の値 + . + 本文」","schema":{"type":"string"}},{"name":"X-FixDay-Event","in":"header","required":true,"description":"イベント名","schema":{"type":"string","enum":["booking.confirmed","booking.rescheduled","booking.cancelled","booking.reminder"]}},{"name":"X-FixDay-Delivery","in":"header","required":true,"description":"配信 ID（再送しても変わらない。本文の id と同じ）","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"},"example":{"id":"01JB2Y9ZQ0DELIVERY00000000","event":"booking.cancelled","occurredAt":1791100000000,"teamId":"01JAT0TEAM000000000000000","teamName":"株式会社サンプル","booking":{"id":"01JB2Y7Q8M3K4N5P6R7S8T9V0W","eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","eventTitle":"30分のオンライン相談","status":"confirmed","approvalState":null,"startAt":1791442800000,"endAt":1791444600000,"timezone":"Asia/Tokyo","guestName":"予約 一郎","guestEmail":"ichiro@example.com","hostNames":["見本 太郎"],"meetingUrl":"https://meet.google.com/abc-defg-hij","manageUrl":"https://fixday.app/b/abcdefghij","cancelReason":null}}}}},"responses":{"200":{"description":"受け取った（2xx なら何でもよい）"}}}},"booking.reminder":{"post":{"operationId":"webhook_booking_reminder","summary":"予約者へリマインドのメールを送った（調整ページで設定したリマインドの時刻ごとに 1 回）","security":[],"description":"管理画面の「外部への通知」で登録した Webhook の URL へ POST する。 X-FixDay-Signature で送信元を確かめ、X-FixDay-Delivery で重複を除くこと（同じ配信が 2 回届くことがある）。 2xx 以外を返すと、間隔を空けて送り直す（最初の送信を含めて最大 5 回）。 ただし FixDay 側で送信待ちに積むこと自体に失敗したイベントは送り直さない（どのイベントも同じ）。","parameters":[{"name":"X-FixDay-Signature","in":"header","required":true,"description":"t=<UNIX 秒>,v1=<HMAC-SHA256 の 16 進>。署名対象は「t の値 + . + 本文」","schema":{"type":"string"}},{"name":"X-FixDay-Event","in":"header","required":true,"description":"イベント名","schema":{"type":"string","enum":["booking.confirmed","booking.rescheduled","booking.cancelled","booking.reminder"]}},{"name":"X-FixDay-Delivery","in":"header","required":true,"description":"配信 ID（再送しても変わらない。本文の id と同じ）","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"},"example":{"id":"reminder_01JB2YJOB000000000000000.01JAT0INTEGRATION0000000","event":"booking.reminder","occurredAt":1791100000000,"teamId":"01JAT0TEAM000000000000000","teamName":"株式会社サンプル","booking":{"id":"01JB2Y7Q8M3K4N5P6R7S8T9V0W","eventTypeId":"01JAXQ3N4P5R6S7T8V9W0X1Y2Z","eventTitle":"30分のオンライン相談","status":"confirmed","approvalState":null,"startAt":1791442800000,"endAt":1791444600000,"timezone":"Asia/Tokyo","guestName":"予約 一郎","guestEmail":"ichiro@example.com","hostNames":["見本 太郎"],"meetingUrl":"https://meet.google.com/abc-defg-hij","manageUrl":"https://fixday.app/b/abcdefghij","cancelReason":null},"reminderMinutes":1440}}}},"responses":{"200":{"description":"受け取った（2xx なら何でもよい）"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fdk_live_...","description":"管理画面の「API キー」で発行したキー。Authorization: Bearer <キー> で送る"}},"responses":{"Unauthorized":{"description":"キーが未指定・不正・失効済み","headers":{"WWW-Authenticate":{"description":"キーが無いとき Bearer realm=\"fixday\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"API キーが無効です"}}}}},"PlanRequired":{"description":"ご契約のプランでは使えない機能（現在、公開 API はすべてのプランで使えるため通常は返らない）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"plan_required","message":"このプランでは公開 API を利用できません"}}}}},"InvalidRequest":{"description":"パラメータの形式が不正","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"from / to は epoch ミリ秒で指定してください"}}}}},"NotFound":{"description":"対象が無い、または他のチームのもの","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"予約が見つかりません"}}}}},"RateLimited":{"description":"レート制限を超えた（キーごとに 1 分 60 回。別枠で、認証に失敗したリクエストは接続元の IP ごとに 1 分 120 回まで。正しいキーのリクエストはこちらに数えない）","headers":{"Retry-After":{"description":"再試行までに待つ秒数","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"1 分あたりの上限","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"残りの回数","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"枠が戻る時刻（epoch 秒）","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"リクエストが多すぎます"}}}}},"InternalError":{"description":"サーバー側の失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"internal_error","message":"キャンセルに失敗しました"}}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized","plan_required","not_found","rate_limited","invalid_request","internal_error"],"description":"分岐にはこちらを使う（公開の約束）"},"message":{"type":"string","description":"日本語の説明。予告なく変わる"}}}}},"EventType":{"type":"object","required":["id","slug","title","description","durationMinutes","status","folderId","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"slug":{"type":"string","description":"URL の末尾（fixday.app/チーム/<slug>）"},"title":{"type":"string"},"description":{"type":["string","null"]},"durationMinutes":{"type":"integer","description":"所要時間（分）"},"status":{"type":"string","enum":["active","paused","archived"]},"folderId":{"type":["string","null"]},"createdAt":{"type":"integer","format":"int64","description":"作成日時（epoch ミリ秒・UTC）"},"updatedAt":{"type":"integer","format":"int64","description":"更新日時（epoch ミリ秒・UTC）"}}},"Slot":{"type":"object","required":["start","end"],"properties":{"start":{"type":"integer","format":"int64","description":"開始（epoch ミリ秒・UTC）"},"end":{"type":"integer","format":"int64","description":"終了（epoch ミリ秒・UTC）"}}},"SlotList":{"type":"object","required":["eventTypeId","timezone","durationMinutes","slots","unavailableHostCount"],"properties":{"eventTypeId":{"type":"string"},"timezone":{"type":"string","description":"受付時間の基準のタイムゾーン（例 Asia/Tokyo）"},"durationMinutes":{"type":"integer"},"slots":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}},"unavailableHostCount":{"type":"integer","description":"カレンダーを読めなかった・予定を登録できない担当者（連携が切れている・カレンダーを接続していない）の数。1 以上だと候補が本来より少なく出ている"}}},"Booking":{"type":"object","required":["id","eventTypeId","status","startAt","endAt","guestTimezone","guestName","guestEmail","guestPhone","meetingUrl","source","cancelReason","cancelledAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"eventTypeId":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","cancelled","rescheduled","failed","no_show"]},"startAt":{"type":"integer","format":"int64","description":"開始（epoch ミリ秒・UTC）"},"endAt":{"type":"integer","format":"int64","description":"終了（epoch ミリ秒・UTC）"},"guestTimezone":{"type":"string","description":"ゲストが予約したときのタイムゾーン"},"guestName":{"type":["string","null"]},"guestEmail":{"type":["string","null"],"format":"email"},"guestPhone":{"type":["string","null"]},"meetingUrl":{"type":["string","null"],"description":"オンライン会議の URL"},"source":{"type":"string","enum":["public","internal","api","poll"],"description":"public=予約ページ / internal=社内 / api / poll=日程投票"},"cancelReason":{"type":["string","null"]},"cancelledAt":{"type":["integer","null"],"format":"int64","description":"キャンセル日時（epoch ミリ秒）"},"createdAt":{"type":"integer","format":"int64","description":"作成日時（epoch ミリ秒・UTC）"},"updatedAt":{"type":"integer","format":"int64","description":"更新日時（epoch ミリ秒・UTC）"}}},"BookingDetail":{"allOf":[{"$ref":"#/components/schemas/Booking"},{"type":"object","required":["answers"],"properties":{"answers":{"type":"array","description":"予約時の質問への回答","items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":["string","null"]}}}}}}]},"BookingList":{"type":"object","required":["bookings","hasMore","limit","offset"],"properties":{"bookings":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"hasMore":{"type":"boolean","description":"次のページがありそうか（返した件数が limit と同じなら true）"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"CancelResult":{"type":"object","required":["ok","orphanedEventCount"],"properties":{"ok":{"type":"boolean","const":true},"orphanedEventCount":{"type":"integer","description":"カレンダーから消せなかった予定の数。1 以上なら手で消す"}}},"WebhookBooking":{"type":"object","required":["id","eventTypeId","eventTitle","status","approvalState","startAt","endAt","timezone","guestName","guestEmail","hostNames","meetingUrl","manageUrl","cancelReason"],"properties":{"id":{"type":"string"},"eventTypeId":{"type":["string","null"]},"eventTitle":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","cancelled","rescheduled","failed","no_show"]},"approvalState":{"type":["string","null"],"enum":["awaiting","approved","rejected","expired",null],"description":"承認フローの状態。却下・期限切れも event は booking.cancelled で、区別はここで付ける"},"startAt":{"type":"integer","format":"int64","description":"開始（epoch ミリ秒・UTC）"},"endAt":{"type":"integer","format":"int64","description":"終了（epoch ミリ秒・UTC）"},"timezone":{"type":"string","description":"チームのタイムゾーン"},"guestName":{"type":["string","null"]},"guestEmail":{"type":["string","null"]},"hostNames":{"type":"array","items":{"type":"string"}},"meetingUrl":{"type":["string","null"]},"manageUrl":{"type":["string","null"],"description":"ゲスト向けの変更・キャンセル URL"},"cancelReason":{"type":["string","null"]}}},"WebhookPayload":{"type":"object","required":["id","event","occurredAt","teamId","teamName","booking"],"properties":{"id":{"type":"string","description":"配信 ID（X-FixDay-Delivery と同じ）。受け手はこれで重複を除く"},"event":{"type":"string","enum":["booking.confirmed","booking.rescheduled","booking.cancelled","booking.reminder"]},"occurredAt":{"type":"integer","format":"int64","description":"発火時刻（epoch ミリ秒・UTC）"},"teamId":{"type":"string"},"teamName":{"type":"string"},"booking":{"$ref":"#/components/schemas/WebhookBooking"},"reminderMinutes":{"type":["integer","null"],"description":"何分前のリマインドか（1440 なら 24 時間前）。**booking.reminder のときだけ付く**。分からない古いリマインドでは null"}}}}}}