{"openapi":"3.1.0","info":{"title":"Landing Service API","version":"1.0.0","description":"Публикация статичных лендингов из блочного текста. Полный справочник блоков: https://lp.somnarium.ru/docs"},"servers":[{"url":"https://lp.somnarium.ru"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API-ключ клиента"}},"schemas":{"Site":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["published","draft"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"content":{"type":"string"}}},"SiteInput":{"type":"object","required":["title","content"],"properties":{"title":{"type":"string","maxLength":200},"content":{"type":"string","description":"Блочный контент, см. /docs"},"slug":{"type":"string","maxLength":60},"description":{"type":"string","maxLength":400},"status":{"type":"string","enum":["published","draft"]},"ttl":{"type":"string","description":"\"30d\", \"3w\", \"1y\", \"forever\""}}}}},"paths":{"/api/v1/sites":{"get":{"summary":"Список сайтов клиента","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}},{"name":"status","in":"query","schema":{"type":"string","enum":["published","draft"]}}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Создать сайт","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInput"}}}},"responses":{"201":{"description":"Создан"},"400":{"description":"Некорректные данные"}}}},"/api/v1/sites/{key}":{"get":{"summary":"Получить сайт","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"id или slug сайта"}],"responses":{"200":{"description":"OK"}}},"patch":{"summary":"Изменить сайт","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"id или slug сайта"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInput"}}}},"responses":{"200":{"description":"OK"}}},"put":{"summary":"Изменить сайт (синоним PATCH)","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"id или slug сайта"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInput"}}}},"responses":{"200":{"description":"OK"}}},"delete":{"summary":"Удалить сайт","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"id или slug сайта"}],"responses":{"200":{"description":"Удалён"}}}},"/api/v1/assets":{"get":{"summary":"Список картинок","responses":{"200":{"description":"OK"}}},"post":{"summary":"Загрузить картинку файлом или по URL","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"ttl":{"type":"string"},"site":{"type":"string","description":"slug сайта, к которому привязать"}}}},"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"ttl":{"type":"string"},"site":{"type":"string"}}}}}},"responses":{"201":{"description":"Загружено"}}}},"/api/v1/assets/{id}":{"delete":{"summary":"Удалить картинку","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Удалена"}}}},"/api/v1/sites/{key}/html":{"get":{"summary":"Предпросмотр страницы без публикации","description":"Отдаёт готовый HTML, работает и для черновиков.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"id или slug сайта"}],"responses":{"200":{"description":"HTML страницы"}}}},"/s/{client}/{slug}":{"get":{"summary":"Опубликованная страница","security":[],"parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTML страницы"},"404":{"description":"Не найдена или черновик"},"410":{"description":"Срок хранения истёк"}}}},"/i/{id}":{"get":{"summary":"Загруженная картинка","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"WebP"},"404":{"description":"Нет или истекла"}}}},"/health":{"get":{"summary":"Проверка живости","security":[],"responses":{"200":{"description":"OK"}}}},"/docs":{"get":{"summary":"Документация (HTML)","security":[],"responses":{"200":{"description":"OK"}}}},"/llms.txt":{"get":{"summary":"Документация в markdown для LLM","security":[],"responses":{"200":{"description":"OK"}}}},"/openapi.json":{"get":{"summary":"Эта спецификация","security":[],"responses":{"200":{"description":"OK"}}}},"/skill":{"get":{"summary":"Готовый скилл для Claude Code","description":"Markdown для .claude/skills/landing-pages/SKILL.md. Синонимы: /skill.md, /SKILL.md","security":[],"responses":{"200":{"description":"markdown"}}}}}}