Приложение / интеграция / v1
Разработчикам / API
Небольшой JSON API для boopi_mod. UTF-8, версионирование и кеширование.
Документация для игроков и мододелов →
https://boopi.site/api/v1| HTTP | Эндпоинт | Описание |
|---|---|---|
| GET | /games | Игры |
| GET | /categories | Категории |
| GET | /mods?game=fallout4&q=&category=&tag=&sort=trending&page=1&per_page=24&adult=0&official=0 | Каталог модов |
| GET | /mods/{slug} | Описание |
| GET | /mods/{slug}/versions | Архив версий |
| GET | /updates?since=2026-01-01T00:00:00Z&page=1 | Недавно обновлённые |
| POST | /files/{id}/downloaded | Скачивания |
| GET | /me | Профиль |
| GET / POST | /me/tracked | Отслеживаемые моды |
| GET | /official/index.json | Официальный |
| GET | /official/index.sig | SHA-256 |
Каталог модов
{"items":[{"id":1,"slug":"example","title":"Example","summary":"…","author":"creator","game":"fallout4","category":"animations","tags":[],"adult":false,"official":false,"version":"1.0.0","icon_url":"https://boopi.site/files/images/…webp","header_url":"https://boopi.site/files/images/…webp","updated_at":"2026-01-01T00:00:00Z","downloads":0,"endorsements":0}],"total":1,"page":1,"per_page":24}Используйте ETag / If-None-Match и повторяйте запросы после HTTP 429. Лимит: 240 запросов в минуту на IP. Статические файлы на сервере поддерживают Range.
sort=trending|newest|updated|downloaded|endorsed; per_page=1…100; adult=0|1; official=0|1
/api/v1/games: poster_url, mod_count · /api/v1/categories?game=fallout4: name_ru, mod_count
Сайт автора / оригинальная страница: homepage_url · Необязательная HTTPS-ссылка до 500 символов; без логина и пароля в URL.
Личные API-токены
Для карточек 18+ требуется подтверждённая сессия или личный токен. Токены создаются в настройках. read позволяет читать профиль и списки; track — менять отслеживание.
Authorization: Bearer <64-character-token>
POST /api/v1/me/tracked
Content-Type: application/json
{"slug":"example","enabled":true}Скачать
После скачивания один раз вызовите счётчик. Приложение отправляет X-Boopi-Client: boopi_mod; браузер также передаёт CSRF-токен.
POST /api/v1/files/1/downloaded
X-Boopi-Client: boopi_mod
X-CSRF-Token: <browser-session-token>401 / 403 / 404 / 409 / 422 / 429; {"error":{"code":"not_found","message":"…"}}
Карточка из подписанного статического каталога владельца. Приложение проверяет подпись перед установкой.
Каталог официальных паков (JSON для приложения)Desktop sign-in (boopi_mod)
The app never asks for a site password. Sign in and approve access in your browser.
POST /api/v1/auth/devicewith{"client":"boopi_mod","client_version":"1.0"}(10/minute/IP). Response includes a 256-bitdevice_code,user_codeformatted XXXX-XXXX,verification_uri,verification_uri_complete,expires_in:900andinterval:5.- Open
https://boopi.site/activate?code=XXXX-XXXX. Login preserves the code. Check the displayed client/version and read/publish permissions, then Allow or Deny. Approval requires a signed-in, unbanned user and CSRF. - Poll
POST /api/v1/auth/tokenwith{"device_code":"…"}every five seconds. HTTP 428 returns{"error":"authorization_pending"},slow_down,access_deniedorexpired_token. Each slow_down adds five seconds to the interval, up to 60. Success returns the shape below. Each device code issues one token.
{"access_token":"64 hex characters","token_type":"Bearer","scope":"read track publish","user":{"username":"creator","role":"user"}}
The token expires in one year and appears in settings as boopi_mod on YYYY-MM-DD. Store it in the desktop OS credential store. Revoke in settings or call POST /api/v1/auth/revoke with Bearer authorization. Never put a token in a URL.
Publishing from the app
Every endpoint below requires a Bearer token with publish scope. Cookies are ignored; CSRF is unnecessary. Responses are private/no-store. Errors use {"error":{"code":"…","message":"…"}} with HTTP 401/403/404/409/413/422/429/507. User publishing limit: 120 requests/minute; image/upload budgets also apply.
| Method | Endpoint | Body and response |
|---|---|---|
| GET | /api/v1/me/mods | Own metadata, status/reason and versions with status/reason/files. |
| POST | /api/v1/me/mods | {title,summary,description,format,game,category,tags:[],adult,requirements,credits,links,homepage_url}. format is markdown or bbcode; game/category accept active slugs or IDs; links accepts an array or newline string. Creates pending metadata and a unique generated slug. |
| PATCH | /api/v1/me/mods/{slug} | Supply changed metadata fields; omitted fields/images stay attached. Author edits return to review and revoke published archives. |
| POST | /api/v1/me/mods/{slug}/images?role=icon|header|gallery | Raw JPEG/PNG/WebP, ≤2 MiB, re-encoded as WebP. Returns {id,url,role}. Icons square ≥256px; headers ≥1280px at 16:9 or 2:1; at most 20 gallery images. |
| POST | /api/v1/me/uploads | {name,size,sha256,kind:"main"|"optional"|"patch"} → {upload_id,chunk_bytes,offset,size,status}. |
| PUT | /api/v1/me/uploads/{id}?offset=N | Raw application/octet-stream chunk ≤chunk_bytes. Offset must match server state; response returns the new offset. |
| GET | /api/v1/me/uploads/{id} | Read current offset/state before resuming or retrying an uncertain request. |
| POST | /api/v1/me/uploads/{id}/finish | Verify size, SHA-256 and archive magic. Invalid assembled data is deleted and the upload becomes failed. Incomplete transfers can resume. |
| POST | /api/v1/me/mods/{slug}/versions | {version,changelog,format,min_app_version,files:[{upload_id,kind}]} → {id,version,status,reason}. Exactly one main file; at most 12 files. Requires completed uploads owned by this user. |
App archives may use .zip, .7z, .rar or .ogmod. .ogmod is boopi_mod's ZIP container and requires ZIP magic. Web validation, quotas and moderation apply: free space ≥max(5 GiB, 3×size), global archive cap 40 GiB by default, 300 MiB/day for authors without an approved mod. Images can follow draft creation; approval requires an icon, header and a valid pending or approved release; joint moderation approves pending releases automatically. Trusted authors autoapprove new versions only for their already approved mods. New mods remain reviewed.
GET /api/v1/updates has default/maximum per_page=20 and cached sanitized descriptions/changelogs. Public cacheable API responses never set cookies. Official signed JSON/signature responses preserve the publisher's exact bytes for clients; website cards omit adult official packs until age confirmation.
