{"openapi":"3.1.0","info":{"title":"lynkr API","version":"1.0.0","description":"リンクまとめページ（link in bio）の作成・編集 API。詳しいガイド: https://lynkr.jp/docs （AI向け: https://lynkr.jp/llms.txt）"},"servers":[{"url":"https://lynkr.jp/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"管理画面で発行する lk_ で始まるトークン"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}},"required":["code","message"]}}},"Block":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["link","social","heading","text","image","gallery","embed","map","divider"]},"visible":{"type":"boolean"},"data":{"type":"object","description":"type ごとのスキーマは BlockData* を参照"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Page":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"},"avatar_url":{"type":"string"},"published":{"type":"boolean"},"theme":{"type":"object"},"seo":{"type":"object"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/Block"}},"owner_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PageCreate":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9_-]{1,30})[a-z0-9]$","description":"ページURL（lynkr.jp/{slug}）"},"title":{"type":"string","maxLength":60,"description":"表示名"},"bio":{"type":"string","maxLength":500,"description":"自己紹介文"},"avatar_url":{"type":"string","maxLength":2048,"description":"アイコン画像URL"},"published":{"type":"boolean","description":"公開するか"},"theme":{"type":"object","properties":{"preset":{"type":"string","enum":["simple","cream","night","midnight","sunset","ocean","mint","sakura","lavender","elegant","forest","pop","cyber"]},"background":{"type":"object","properties":{"type":{"type":"string","enum":["solid","gradient","image"]},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"from":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"to":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"angle":{"type":"integer","minimum":0,"maximum":360},"image":{"type":"string","maxLength":2048},"overlay":{"type":"number","minimum":0,"maximum":0.9},"blur":{"type":"integer","minimum":0,"maximum":30}},"additionalProperties":false},"text_color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"font":{"type":"string","enum":["system","noto_sans","maru","zen_maru","mincho","kosugi","klee","dela","dot","mono"]},"button":{"type":"object","properties":{"style":{"type":"string","enum":["fill","outline","soft","shadow","hard","glass"]},"shape":{"type":"string","enum":["square","rounded","pill"]},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"text_color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"}},"additionalProperties":false},"avatar_shape":{"type":"string","enum":["circle","rounded","square"]}},"additionalProperties":false},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":200},"image":{"type":"string","maxLength":2048},"noindex":{"type":"boolean"}},"additionalProperties":false},"blocks":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"description":"既存ブロックのID（PUT で既存ブロックを更新するとき）","type":"string","maxLength":40},"type":{"type":"string","minLength":1,"maxLength":30,"description":"ブロック種別（GET /api/v1/meta/block-types を参照）"},"visible":{"type":"boolean"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["type"],"additionalProperties":false}}},"required":["slug"],"additionalProperties":false},"PagePatch":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9_-]{1,30})[a-z0-9]$"},"title":{"type":"string","maxLength":60,"description":"表示名"},"bio":{"type":"string","maxLength":500,"description":"自己紹介文"},"avatar_url":{"type":"string","maxLength":2048,"description":"アイコン画像URL"},"published":{"type":"boolean","description":"公開するか"},"theme":{"description":"テーマの差分（JSON Merge Patch）。null でプリセットの初期状態に戻す","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"seo":{"description":"SEO設定の差分（JSON Merge Patch）","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":false},"PageDocument":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9_-]{1,30})[a-z0-9]$"},"title":{"type":"string","maxLength":60,"description":"表示名"},"bio":{"type":"string","maxLength":500,"description":"自己紹介文"},"avatar_url":{"type":"string","maxLength":2048,"description":"アイコン画像URL"},"published":{"type":"boolean","description":"公開するか"},"theme":{"type":"object","properties":{"preset":{"type":"string","enum":["simple","cream","night","midnight","sunset","ocean","mint","sakura","lavender","elegant","forest","pop","cyber"]},"background":{"type":"object","properties":{"type":{"type":"string","enum":["solid","gradient","image"]},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"from":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"to":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"angle":{"type":"integer","minimum":0,"maximum":360},"image":{"type":"string","maxLength":2048},"overlay":{"type":"number","minimum":0,"maximum":0.9},"blur":{"type":"integer","minimum":0,"maximum":30}},"additionalProperties":false},"text_color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"font":{"type":"string","enum":["system","noto_sans","maru","zen_maru","mincho","kosugi","klee","dela","dot","mono"]},"button":{"type":"object","properties":{"style":{"type":"string","enum":["fill","outline","soft","shadow","hard","glass"]},"shape":{"type":"string","enum":["square","rounded","pill"]},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"text_color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"}},"additionalProperties":false},"avatar_shape":{"type":"string","enum":["circle","rounded","square"]}},"additionalProperties":false},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":200},"image":{"type":"string","maxLength":2048},"noindex":{"type":"boolean"}},"additionalProperties":false},"blocks":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"description":"既存ブロックのID（PUT で既存ブロックを更新するとき）","type":"string","maxLength":40},"type":{"type":"string","minLength":1,"maxLength":30,"description":"ブロック種別（GET /api/v1/meta/block-types を参照）"},"visible":{"type":"boolean"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["type"],"additionalProperties":false}},"id":{"type":"string"},"url":{"type":"string"},"owner_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["blocks"],"additionalProperties":false},"BlockCreate":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":30},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"visible":{"type":"boolean"},"position":{"description":"挿入位置（0 = 先頭。省略で末尾）","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"],"additionalProperties":false},"BlockPatch":{"type":"object","properties":{"type":{"description":"種別を変える場合は data も全体を指定する","type":"string","minLength":1,"maxLength":30},"data":{"description":"JSON Merge Patch（null でキー削除）","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"visible":{"type":"boolean"},"position":{"description":"移動先の位置（0 = 先頭）","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"Reorder":{"type":"object","properties":{"ids":{"maxItems":100,"type":"array","items":{"type":"string"},"description":"ブロックIDを表示したい順に並べた配列（全ブロック分）"}},"required":["ids"],"additionalProperties":false},"TokenCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["read","write","admin"]}},"expires_in_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":3650},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"BlockData_link":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048},"description":{"type":"string","maxLength":140},"thumbnail":{"type":"string","maxLength":2048},"icon":{"type":"string","enum":["auto","none","x","instagram","tiktok","youtube","line","facebook","threads","bluesky","note","github","discord","twitch","spotify","applemusic","soundcloud","pinterest","mastodon","misskey","pixiv","ameba","telegram","whatsapp","patreon","substack","medium","zenn","qiita","niconico","vimeo","snapchat","reddit","kofi","buymeacoffee","etsy","tumblr","applepodcasts","kick","bilibili","steam","gumroad","behance","dribbble","figma","notion","linkedin","amazon","booth","email","phone","website"]},"style":{"type":"string","enum":["button","card","image"]},"highlight":{"type":"string","enum":["none","shake","pulse","shine"]}},"required":["title","url"],"additionalProperties":false,"description":"リンク: ボタン型のリンク。URLからSNSアイコンを自動表示します","examples":[{"title":"Instagram","url":"https://www.instagram.com/lynkr_jp","description":"毎日更新中","style":"button"}]},"BlockData_social":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["x","instagram","tiktok","youtube","line","facebook","threads","bluesky","note","github","discord","twitch","spotify","applemusic","soundcloud","pinterest","mastodon","misskey","pixiv","ameba","telegram","whatsapp","patreon","substack","medium","zenn","qiita","niconico","vimeo","snapchat","reddit","kofi","buymeacoffee","etsy","tumblr","applepodcasts","kick","bilibili","steam","gumroad","behance","dribbble","figma","notion","linkedin","amazon","booth","email","phone","website"]},"url":{"type":"string","minLength":1,"maxLength":2048}},"required":["service","url"],"additionalProperties":false}},"style":{"type":"string","enum":["mono","brand"]},"size":{"type":"string","enum":["sm","md","lg"]}},"required":["items"],"additionalProperties":false,"description":"SNSアイコン: SNSのアイコンを横に並べて表示。@ユーザー名だけでもOK","examples":[{"items":[{"service":"x","url":"@lynkr_jp"},{"service":"instagram","url":"https://www.instagram.com/lynkr_jp"},{"service":"email","url":"hello@example.com"}],"style":"mono"}]},"BlockData_heading":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100},"align":{"type":"string","enum":["left","center","right"]},"size":{"type":"string","enum":["sm","md","lg"]}},"required":["text"],"additionalProperties":false,"description":"見出し: セクションの見出しテキスト","examples":[{"text":"お仕事のご依頼","align":"center","size":"md"}]},"BlockData_text":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":3000},"align":{"type":"string","enum":["left","center","right"]},"style":{"type":"string","enum":["plain","card"]}},"required":["text"],"additionalProperties":false,"description":"テキスト: 文章。改行・URL自動リンク・**太字**・[ラベル](URL) が使えます","examples":[{"text":"東京を拠点に活動するイラストレーターです。\nお仕事のご依頼は **メール** からどうぞ。","align":"center"}]},"BlockData_image":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"src":{"type":"string","maxLength":2048},"alt":{"type":"string","maxLength":200},"link":{"type":"string","maxLength":2048},"caption":{"type":"string","maxLength":200},"aspect":{"type":"string","enum":["auto","1:1","4:3","16:9","3:4"]}},"required":["src"],"additionalProperties":false,"description":"画像: 1枚の画像。リンクを付けることもできます","examples":[{"src":"https://images.example.com/cover.jpg","alt":"新作のポスター","link":"https://example.com/shop","aspect":"16:9"}]},"BlockData_gallery":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"images":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"src":{"type":"string","maxLength":2048},"alt":{"type":"string","maxLength":200},"link":{"type":"string","maxLength":2048}},"required":["src"],"additionalProperties":false}},"layout":{"type":"string","enum":["grid2","grid3","carousel"]},"aspect":{"type":"string","enum":["auto","1:1","4:3","16:9","3:4"]}},"required":["images"],"additionalProperties":false,"description":"ギャラリー: 複数の画像をグリッドまたは横スクロールで表示","examples":[{"images":[{"src":"https://images.example.com/1.jpg"},{"src":"https://images.example.com/2.jpg","link":"https://example.com"}],"layout":"grid2","aspect":"1:1"}]},"BlockData_embed":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2048},"title":{"type":"string","maxLength":100}},"required":["url"],"additionalProperties":false,"description":"動画・音楽: YouTube / Vimeo / Spotify / SoundCloud / Apple Music / TikTok のURLを貼るだけでプレイヤーを埋め込み","examples":[{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","title":"最新MV"}]},"BlockData_map":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200},"zoom":{"type":"integer","minimum":3,"maximum":20},"title":{"type":"string","maxLength":100}},"required":["query"],"additionalProperties":false,"description":"地図: 住所や店名から Google マップを埋め込み","examples":[{"query":"東京タワー","title":"アクセス","zoom":15}]},"BlockData_divider":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"style":{"type":"string","enum":["line","dots","space"]},"size":{"type":"string","enum":["sm","md","lg"]}},"additionalProperties":false,"description":"区切り・余白: 線・ドット・余白でブロックを区切る","examples":[{"style":"line","size":"md"}]}}},"paths":{"/me":{"get":{"summary":"自分の情報","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages":{"get":{"summary":"ページ一覧","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"ページ作成","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{ref}":{"parameters":[{"name":"ref","in":"path","required":true,"description":"slug / ページID（pg_...）/ ページURL","schema":{"type":"string"}}],"get":{"summary":"ページ取得（ブロック含む）","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"ページの部分更新（theme / seo は JSON Merge Patch）","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagePatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"ページの宣言的同期（blocks は配列にそろえる。その他は送ったフィールドだけ置き換え）","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDocument"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"ページ削除","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{ref}/blocks":{"parameters":[{"name":"ref","in":"path","required":true,"description":"slug / ページID（pg_...）/ ページURL","schema":{"type":"string"}}],"get":{"summary":"ブロック一覧","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"blocks":{"type":"array","items":{"$ref":"#/components/schemas/Block"}}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"ブロック追加","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/Block"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{ref}/blocks/reorder":{"parameters":[{"name":"ref","in":"path","required":true,"description":"slug / ページID（pg_...）/ ページURL","schema":{"type":"string"}}],"post":{"summary":"ブロックの並べ替え","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reorder"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{ref}/blocks/{blockId}":{"parameters":[{"name":"ref","in":"path","required":true,"description":"slug / ページID（pg_...）/ ページURL","schema":{"type":"string"}},{"name":"blockId","in":"path","required":true,"schema":{"type":"string","pattern":"^bk_[0-9a-z]{16}$"}}],"get":{"summary":"ブロック取得","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/Block"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"ブロック更新（data は JSON Merge Patch、position で移動）","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockPatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/Block"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"ブロック削除","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{ref}/blocks/{blockId}/duplicate":{"parameters":[{"name":"ref","in":"path","required":true,"description":"slug / ページID（pg_...）/ ページURL","schema":{"type":"string"}},{"name":"blockId","in":"path","required":true,"schema":{"type":"string","pattern":"^bk_[0-9a-z]{16}$"}}],"post":{"summary":"ブロック複製","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/Block"}}}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{ref}/analytics":{"parameters":[{"name":"ref","in":"path","required":true,"description":"slug / ページID（pg_...）/ ページURL","schema":{"type":"string"}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"get":{"summary":"アクセス解析（JST）","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images":{"get":{"summary":"画像一覧","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"画像アップロード","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}},"image/*":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"取り込む画像のURL"}},"required":["url"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"画像削除","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/unfurl":{"get":{"summary":"リンク先のタイトル・OGP画像を取得","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meta":{"get":{"summary":"ブロック種別・テーマ・SNS一覧（認証不要）","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/slugs/{slug}":{"get":{"summary":"URLの空き状況（認証不要）","security":[],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/tokens":{"get":{"summary":"APIトークン一覧（ログイン中のブラウザのみ）","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"APIトークン発行（ログイン中のブラウザのみ）","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"入力エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"権限なし・上限超過","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}