{"openapi":"3.0.3","info":{"title":"Min (MinChat) API","version":"2026-10-22","description":"REST API of the Min messenger and its Telegram-compatible Bot API. Human-readable docs: https://minchatapp.com/docs"},"servers":[{"url":"https://minchatapp.com"}],"externalDocs":{"url":"https://minchatapp.com/docs"},"tags":[{"name":"Auth","description":"Auth endpoints. Docs: https://minchatapp.com/docs"},{"name":"Sessions","description":"Sessions endpoints. Docs: https://minchatapp.com/docs"},{"name":"Users","description":"Users endpoints. Docs: https://minchatapp.com/docs"},{"name":"Conversations","description":"Conversations endpoints. Docs: https://minchatapp.com/docs"},{"name":"Messages","description":"Messages endpoints. Docs: https://minchatapp.com/docs"},{"name":"Media","description":"Media endpoints. Docs: https://minchatapp.com/docs"},{"name":"Calls","description":"Calls endpoints. Docs: https://minchatapp.com/docs"},{"name":"Notifications","description":"Notifications endpoints. Docs: https://minchatapp.com/docs"},{"name":"Clients","description":"Clients endpoints. Docs: https://minchatapp.com/docs"},{"name":"Emoji","description":"Emoji endpoints. Docs: https://minchatapp.com/docs"},{"name":"Bots (management)","description":"Bots (management) endpoints. Docs: https://minchatapp.com/docs"},{"name":"Bot API","description":"Telegram-compatible Bot API. Methods accept GET or POST (JSON, form or multipart). Docs: https://minchatapp.com/docs/bots/reference"}],"paths":{"/api/auth/start":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-start","summary":"Start sign-in (identifier-first)","description":"Step 1 of the sign-in wizard. Normalises the identifier (email → lowercase, phone → E.164), looks the account up and decides the next step. Returns a `ticket` (48 chars) that links the following steps. `next` is `password` for existing accounts, `code` for a new account outside Russia (a one-time code is sent), `invite` for a new account in Russia (registration by invite only). There is no cloud password / 2FA. Rate limit: 20/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","description":"Email or phone number. Rules: max 255 chars."}},"required":["identifier"]},"example":{"identifier":"anna@example.com"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"next":"password","ticket":"NOtN0Li5lPE01BIr6Gx6iBAOspXxUp9f9nBmnxWPOlsLcosG","region":"other","can_request_code":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/password":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-password","summary":"Sign in with password","description":"Step 2 for existing accounts. Returns a Sanctum token and the user. Rate limit: 10/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string","description":"Ticket from /auth/start. Rules: exactly 48 chars."},"password":{"type":"string","description":"Account password."}},"required":["ticket","password"]},"example":{"ticket":"<ticket>","password":"Secret123"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"user":{"id":3,"name":"Vera Kotova","email":"vera@example.com","created_at":"2026-10-20T11:12:46.000000Z","updated_at":"2026-10-22T09:12:49.000000Z","avatar":null,"last_seen_at":"2026-10-22T09:12:49.000000Z","push_notifications_enabled":true,"invited_by_id":null,"invite_id":null,"locale":"ru","default_history_ttl":0,"phone":null,"about":null,"birthday":null,"username":null,"is_bot":false,"phone_verified_at":null,"avatar_url":null},"token":"17|Q2pXexampleSanctumToken0000000000000000000"}}}},"401":{"description":"wrong","content":{"application/json":{"example":{"success":false,"code":"auth.ticket_invalid","error":"Sign-in session expired. Start again.","message":"Sign-in session expired. Start again."}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/request-code":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-request-code","summary":"Request a one-time code","description":"Sends a one-time login code instead of the password. Delivery: an active MinChat client of the account (in-app, realtime event `LoginCodeRequested`), SMS for non-RU phones, or email. In Russia only in-app delivery is available. Cooldown: SMS 60 s, email/in-app 30 s. Rate limit: 10/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string","description":"Ticket from /auth/start. Rules: exactly 48 chars."}},"required":["ticket"]},"example":{"ticket":"<ticket>"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/resend-code":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-resend-code","summary":"Resend the one-time code","description":"Same as `request-code`, respects the cooldown. Rate limit: 10/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string","description":"Ticket from /auth/start. Rules: exactly 48 chars."}},"required":["ticket"]},"example":{"ticket":"<ticket>"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/verify-code":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-verify-code","summary":"Verify the one-time code","description":"Existing account → returns `token` + `user`. New account (outside Russia) → `{\"next\":\"name\"}`, continue with `/auth/register`. Rate limit: 20/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string","description":"Ticket from /auth/start. Rules: exactly 48 chars."},"code":{"type":"string","description":"6-digit code. Rules: max 12 chars."}},"required":["ticket","code"]},"example":{"ticket":"<ticket>","code":"123456"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/register":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-register","summary":"Finish registration","description":"`invite_code` is required only for the `ru` region. Returns `token` + `user`. Rate limit: 5/10 min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string","description":"Ticket from /auth/start. Rules: exactly 48 chars."},"name":{"type":"string","description":"Display name. Rules: max 255 chars."},"password":{"type":"string","description":"New password. Rules: requires password_confirmation; min 8, letters + digits."},"invite_code":{"type":"string","description":"Invite code (RU only). Rules: max 32 chars."},"password_confirmation":{"type":"string"}},"required":["ticket","name","password"]},"example":{"ticket":"<ticket>","name":"Anna Smith","password":"Secret123","password_confirmation":"Secret123"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/login":{"post":{"tags":["Auth"],"operationId":"POST--api-login","summary":"Sign in with email + password (legacy)","description":"One-step login kept for older clients; new clients should use `/auth/*`. After 5 failed attempts in 15 minutes from one IP the endpoint answers 429. Rate limit: 10/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Account email. Rules: email."},"password":{"type":"string","description":"Password."}},"required":["email","password"]},"example":{"email":"anna@example.com","password":"Secret123"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"user":{"id":3,"name":"Vera Kotova","email":"vera@example.com","created_at":"2026-10-20T11:12:46.000000Z","updated_at":"2026-10-22T09:12:48.000000Z","avatar":null,"last_seen_at":"2026-10-22T09:12:48.000000Z","push_notifications_enabled":true,"invited_by_id":null,"invite_id":null,"locale":"ru","default_history_ttl":0,"phone":null,"about":null,"birthday":null,"username":null,"is_bot":false,"phone_verified_at":null,"avatar_url":null},"token":"17|Q2pXexampleSanctumToken0000000000000000000"}}}},"401":{"description":"401","content":{"application/json":{"example":{"success":false,"code":"auth.invalid_credentials","error":"Invalid email or password","message":"Invalid email or password"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/register":{"post":{"tags":["Auth"],"operationId":"POST--api-register","summary":"Register with email (legacy)","description":"Legacy registration. Same response as `/login`. Rate limit: 5/10 min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name. Rules: max 255 chars."},"email":{"type":"string","description":"Email. Rules: email; unique."},"password":{"type":"string","description":"Password. Rules: requires password_confirmation; min 8, letters + digits."},"invite_code":{"type":"string","description":"Invite code (when invites are required)."},"password_confirmation":{"type":"string"}},"required":["name","email","password"]},"example":{"name":"Anna Smith","email":"anna@example.com","password":"Secret123","password_confirmation":"Secret123","invite_code":"ABCDEF"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/logout":{"post":{"tags":["Auth"],"operationId":"POST--api-logout","summary":"Sign out","description":"Revokes the current token, or all tokens of the account with `?all=1` (or `{\"all\":true}`). Revoked sessions receive `SessionsRevoked`.","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"boolean","description":"Revoke every token of the account."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"code":"auth.logged_out","message":"Logged out."}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/forgot-password":{"post":{"tags":["Auth"],"operationId":"POST--api-forgot-password","summary":"Send a password reset link","description":"Always answers with a neutral message. `client`: `desktop` → `minchat://reset-password/…`, `android`/`app` → `minchatapp://reset-password/…`, otherwise the web URL `/password/reset/{token}`. Rate limit: 5/10 min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address. Rules: email; max 255 chars."},"client":{"type":"string","description":"Where the link should open: desktop, android, app or web (default)."}},"required":["email"]},"example":{"email":"anna@example.com","client":"android"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"code":"password.reset_sent","message":"If an account exists, we sent a password reset email."}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/reset-password":{"post":{"tags":["Auth"],"operationId":"POST--api-reset-password","summary":"Reset the password","description":"Uses the token from the email. Rate limit: 10/10 min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Token from the reset email."},"email":{"type":"string","description":"Email address. Rules: email."},"password":{"type":"string","description":"Password. Rules: requires password_confirmation; min 8, letters + digits."},"password_confirmation":{"type":"string"}},"required":["token","email","password"]},"example":{"token":"<from-email>","email":"anna@example.com","password":"NewSecret123","password_confirmation":"NewSecret123"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/change-password":{"post":{"tags":["Auth"],"operationId":"POST--api-change-password","summary":"Change the password","description":"Requires the current password. Rate limit: 10/10 min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"current_password":{"type":"string","description":"Current password."},"password":{"type":"string","description":"Password. Rules: requires password_confirmation; must differ from current_password; min 8, letters + digits."},"password_confirmation":{"type":"string"}},"required":["current_password","password"]},"example":{"current_password":"Secret123","password":"NewSecret123","password_confirmation":"NewSecret123"}}}},"responses":{"422":{"description":"wrong","content":{"application/json":{"example":{"success":false,"code":"password.wrong_current","error":"Current password is incorrect.","message":"Current password is incorrect."}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/qr":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-qr","summary":"Create a QR login request","description":"Called by a signed-out desktop/web client. Render `qr` as a QR code; it lives `expires_in` seconds (90). Then either poll `/auth/qr/poll` with `poll_token` or subscribe to the public channel `channel` and wait for `QrLoginUpdated`. Rate limit: 20/min.","security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"qr":"minchat-login:sBopO38GonBMQ39qB3d2lEGwXPEdkKV6QYR96PqYFQ1Bq4M8","poll_token":"3KFapxV62nDlATwjomaI5HqHB9HyBCVTYo7TqNX6pxdNsVjp","channel":"qr-login.e4a27d213ac0f5cc88a2d3df9fb46f3c53315953b9f5082e89e088fd78844e5a","expires_at":"2026-10-22T09:07:43+00:00","expires_in":90}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/qr/poll":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-qr-poll","summary":"Poll a QR login request","description":"`status`: `pending`, `confirmed` (the response then contains `token` and `user` — the token is handed out once), `consumed`, `declined`, `expired`. An unknown token also returns `expired`. Rate limit: 90/min.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"poll_token":{"type":"string","description":"poll_token from /auth/qr. Rules: max 128 chars."}},"required":["poll_token"]},"example":{"poll_token":"<poll_token>"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"expired"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/qr/inspect":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-qr-inspect","summary":"Inspect a scanned QR code","description":"The signed-in phone shows who is asking to sign in (device, platform, IP, location) before confirming. Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The scanned QR payload (minchat-login:…) or its token part."}},"required":["token"]},"example":{"token":"minchat-login:<token>"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/qr/confirm":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-qr-confirm","summary":"Confirm QR login","description":"Issues a new session for the requesting device. The requester receives `QrLoginUpdated {status:\"confirmed\"}`. Rate limit: 10/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The scanned QR payload (minchat-login:…) or its token part."}},"required":["token"]},"example":{"token":"minchat-login:<token>"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/qr/decline":{"post":{"tags":["Auth"],"operationId":"POST--api-auth-qr-decline","summary":"Decline QR login","description":"The requester receives `QrLoginUpdated {status:\"declined\"}`. Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The scanned QR payload (minchat-login:…) or its token part."}},"required":["token"]},"example":{"token":"minchat-login:<token>"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/google":{"get":{"tags":["Auth"],"operationId":"GET--auth-google","summary":"Google sign-in (web redirect)","description":"Browser redirect to Google. Optional `?invite=CODE` is kept in the session for registration. Not under `/api`. Rate limit: 20/min.","security":[],"parameters":[{"name":"invite","in":"query","required":false,"description":"Invite code for new accounts.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/google/callback":{"get":{"tags":["Auth"],"operationId":"GET--auth-google-callback","summary":"Google OAuth callback","description":"On success redirects to `/web` and sets a short-lived httpOnly cookie `oauth_exchange` (2 minutes). Errors redirect to `/?error=…` (`invite_required`, `account_banned`, `google_auth_failed`, …). Rate limit: 20/min.","security":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/oauth-exchange":{"post":{"tags":["Auth"],"operationId":"POST--auth-oauth-exchange","summary":"Exchange the Google OAuth code for a token","description":"The web app calls this right after the redirect. Reads the `oauth_exchange` cookie (one-time) and returns `{success:true, token}`; 204 when there is nothing to exchange, 401 `auth.oauth_expired` when it has expired. Rate limit: 10/min.","security":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/sessions":{"get":{"tags":["Sessions"],"operationId":"GET--api-user-sessions","summary":"List sessions (devices)","description":"Every Sanctum token of the account is a session. `current` marks the token of this request. `platform`/`client`/`app_version`/`device_name` come from the `X-Client-Platform`, `X-Client-Version`, `X-Device-Name` headers and the User-Agent; `location` is derived from the IP.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"sessions":[{"id":1,"current":true,"label":"Laptop","device_name":"Chrome, macOS","client":"web","app_version":null,"ip":"203.0.113.10","location":"Moscow, Russia","platform":"Web","created_at":"2026-10-20T11:12:45+00:00","last_used_at":"2026-10-22T09:06:13+00:00"},{"id":19,"current":false,"label":"Chrome","device_name":"Mac","client":"desktop","app_version":"1.0.44","ip":"203.0.113.10","location":null,"platform":"macOS","created_at":"2026-10-21T07:17:33+00:00","last_used_at":"2026-10-21T07:18:34+00:00"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Sessions"],"operationId":"DELETE--api-user-sessions","summary":"Terminate all other sessions","description":"Revokes every token except the current one.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"terminated":11}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/sessions/{id}":{"delete":{"tags":["Sessions"],"operationId":"DELETE--api-user-sessions-id","summary":"Terminate a session","description":"Revokes one token; that device receives `SessionsRevoked`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Session (token) id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user":{"get":{"tags":["Users"],"operationId":"GET--api-user","summary":"Get the current user","description":"Profile of the authenticated user.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":1,"name":"Anna Smith","email":"anna@example.com","created_at":"2026-10-20T11:12:45.000000Z","updated_at":"2026-10-21T07:17:33.000000Z","avatar":null,"last_seen_at":"2026-10-21T07:18:22.000000Z","push_notifications_enabled":true,"invited_by_id":null,"invite_id":null,"locale":"ru","default_history_ttl":0,"phone":null,"about":null,"birthday":null,"username":"anna_s","is_bot":false,"phone_verified_at":null,"avatar_url":null,"via_google":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Users"],"operationId":"POST--api-user","summary":"Update the profile","description":"Partial update (send only the fields you change). `avatar` is an image (jpeg/png/gif/webp, ≤ 4000×4000), resized to 800×800 JPEG. `username` follows the shared username rules (5–32 chars, `^[a-z][a-z0-9_]{4,31}$`, must not end with `bot`). `locale` sets the language of emails and push notifications.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name. Rules: max 255 chars."},"username":{"type":"string","description":"Public @username, null to remove. Rules: max 32 chars."},"avatar":{"type":"string","format":"binary","description":"Avatar image (multipart). Rules: max 5 MB."},"push_notifications_enabled":{"type":"boolean","description":"Global push switch."},"locale":{"type":"string","description":"ru or en. Rules: one of: ru, en."},"about":{"type":"string","description":"Bio. Rules: max 500 chars."},"phone":{"type":"string","description":"Phone shown in the profile. Rules: max 32 chars."},"birthday":{"type":"string","description":"Birthday (date)."}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"user":{"id":1,"name":"Anna Smith","email":"anna@example.com","created_at":"2026-10-20T11:12:45.000000Z","updated_at":"2026-10-22T09:12:50.000000Z","avatar":null,"last_seen_at":"2026-10-22T09:11:15.000000Z","push_notifications_enabled":true,"invited_by_id":null,"invite_id":null,"locale":"en","default_history_ttl":0,"phone":null,"about":"Product designer","birthday":null,"username":"anna_s","is_bot":false,"phone_verified_at":null,"avatar_url":null,"via_google":false}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Users"],"operationId":"DELETE--api-user","summary":"Delete the account","description":"Irreversible. Accounts with a password must send `password`; others send `confirmation`. Rate limit: 10/10 min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmation":{"type":"string","description":"Confirmation phrase."},"password":{"type":"string","description":"Current password."}},"required":["confirmation","password"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/email/request":{"post":{"tags":["Users"],"operationId":"POST--api-user-email-request","summary":"Request an email change","description":"Sends a code to the **new** address. `current_password` is required if the account has a password. Rate limit: 5/10 min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address. Rules: email; max 255 chars."},"current_password":{"type":"string","description":"Current password. Rules: max 256 chars."}},"required":["email"]},"example":{"email":"new@example.com","current_password":"Secret123"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/email/confirm":{"post":{"tags":["Users"],"operationId":"POST--api-user-email-confirm","summary":"Confirm the email change","description":"Applies the new email; the old address gets a notification. Rate limit: 10/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Code from the email. Rules: max 12 chars."}},"required":["code"]},"example":{"code":"123456"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/auto-delete":{"get":{"tags":["Users"],"operationId":"GET--api-user-auto-delete","summary":"Default auto-delete timer","description":"`period` in seconds (0 = off), applied to new chats.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"period":0}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Users"],"operationId":"POST--api-user-auto-delete","summary":"Set the default auto-delete timer","description":"","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"integer","description":"Seconds, 0 = off, max one year. Rules: ≥ 0; ≤ 31536000."}},"required":["period"]},"example":{"period":604800}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"period":604800}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/client-state":{"get":{"tags":["Users"],"operationId":"GET--api-user-client-state","summary":"Get synced client state","description":"Cross-device state: privacy settings, folders, archived and pinned chats, quick reactions.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"privacy":[],"global_privacy":[],"folders":[],"archived":[],"pinned":[],"quick_reactions":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Users"],"operationId":"PUT--api-user-client-state","summary":"Update synced client state","description":"Send only the keys you change. `quick_reactions` is a list of emoji ids (up to 8); `null` resets to the default set. The response echoes the full state; quick reactions are expanded into emoji cards.","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"privacy":{"type":"array","items":{},"description":"Per-chat privacy flags."},"global_privacy":{"type":"array","items":{},"description":"Global privacy settings (last seen, etc.)."},"folders":{"type":"array","items":{},"description":"Chat folders. Rules: max 10 items."},"archived":{"type":"array","items":{},"description":"Archived conversation ids. Rules: max 500 items."},"pinned":{"type":"array","items":{},"description":"Pinned conversation ids. Rules: max 10 items."},"quick_reactions":{"type":"array","items":{},"description":"Emoji ids for the quick reaction bar. Rules: max 8 items."}}},"example":{"quick_reactions":[1,2,3]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"privacy":[],"global_privacy":[],"folders":[],"archived":[],"pinned":[],"quick_reactions":[{"emoji_id":1,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"thumbsup","kind":"unicode","unicode":"👍","image_url":null,"count":0},{"emoji_id":2,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"heart","kind":"unicode","unicode":"❤️","image_url":null,"count":0},{"emoji_id":3,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"joy","kind":"unicode","unicode":"😂","image_url":null,"count":0}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/users/search":{"get":{"tags":["Users"],"operationId":"GET--api-users-search","summary":"Search users","description":"Search by name/username (≥ 2 chars), up to 20 results. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":true,"description":"Search string. Rules: min 2 chars.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":2,"name":"Boris Petrov","avatar":null,"last_seen_at":"2026-10-21T06:46:11+00:00","status_hidden":false,"last_seen_bucket":null,"phone":null,"about":null,"birthday":null}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/username-available":{"get":{"tags":["Users"],"operationId":"GET--api-username-available","summary":"Check a username","description":"Usernames are shared by people, bots and channels. `kind`: `human` (default), `bot` (must end with `bot`), `channel`. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"query","required":true,"description":"Username to check. Rules: max 32 chars.","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"human, bot or channel.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"username":"weather_bot","available":true,"reason":null,"code":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/blocks":{"get":{"tags":["Users"],"operationId":"GET--api-blocks","summary":"List blocked users","description":"","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":4,"name":"Gleb Orlov","avatar":null}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Users"],"operationId":"POST--api-blocks","summary":"Block a user","description":"The blocked user can no longer message you in private. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","description":"User id. Rules: must exist (users)."}},"required":["user_id"]},"example":{"user_id":4}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/blocks/{userId}":{"delete":{"tags":["Users"],"operationId":"DELETE--api-blocks-userid","summary":"Unblock a user","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"User id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/contact-link":{"get":{"tags":["Users"],"operationId":"GET--api-user-contact-link","summary":"My contact link","description":"Personal link `/u/{token}` (and `/u/{username}` when a username is set) that opens a private chat with you.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"token":"KRNaDjeuvS2A","url":"https://minchatapp.com/u/KRNaDjeuvS2A","username_url":"https://minchatapp.com/u/anna_s"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user/contact-link/rotate":{"post":{"tags":["Users"],"operationId":"POST--api-user-contact-link-rotate","summary":"Rotate the contact link","description":"The old token stops working. Rate limit: 10/min.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"token":"g2uGkOSB5TtE","url":"https://minchatapp.com/u/g2uGkOSB5TtE","username_url":"https://minchatapp.com/u/anna_s"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/contact-links/{token}":{"get":{"tags":["Users"],"operationId":"GET--api-contact-links-token","summary":"Preview a contact link","description":"Public (Bearer optional). `token` may also be `@username`. Rate limit: 60/min.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"Token from the link.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"user":{"id":null,"name":"Anna Smith","username":"anna_s","avatar":null,"is_bot":false},"is_self":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/contact-links/{token}/open":{"post":{"tags":["Users"],"operationId":"POST--api-contact-links-token-open","summary":"Open a contact link","description":"Creates (or returns) the private chat with the link owner. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"Token from the link.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":5,"name":"Anna Smith","type":"private","peer_user_id":1,"avatar":null,"last_message":null,"unread_count":0,"peer_last_seen_at":"2026-10-22T09:12:50+00:00","peer_status_hidden":false,"peer_last_seen_bucket":null,"peer_calls_allowed":true,"peer_phone":null,"peer_about":"Product designer","peer_birthday":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/invites":{"get":{"tags":["Users"],"operationId":"GET--api-invites","summary":"My registration invites","description":"Non-personal invite codes created by the user.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"invites":[],"limits":{"max_active":10}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Users"],"operationId":"POST--api-invites","summary":"Create a registration invite","description":"Up to 10 active codes per user. Rate limit: 20/10 min.","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"max_uses":{"type":"integer","description":"Maximum number of uses. Rules: ≥ 1; ≤ 100."},"expires_in_days":{"type":"integer","description":"Lifetime in days. Rules: ≥ 1; ≤ 365."},"note":{"type":"string","description":"Private note. Rules: max 255 chars."}}},"example":{"max_uses":1,"expires_in_days":30,"note":"For a friend"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"invite":{"id":2,"code":"XQBGFORV1V","is_personal":false,"max_uses":1,"uses_count":0,"expires_at":"2026-11-21T09:12:50.000000Z","revoked_at":null,"note":"For a friend","created_at":"2026-10-22T09:12:50.000000Z","is_usable":true,"invited_users":[]}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/invites/personal":{"get":{"tags":["Users"],"operationId":"GET--api-invites-personal","summary":"Personal invite link","description":"Returns (creating if needed) the personal invite code.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"invite":{"id":1,"code":"I7TSXMCTZX","is_personal":true,"max_uses":1,"uses_count":0,"expires_at":null,"revoked_at":null,"note":null,"created_at":"2026-10-21T06:47:17.000000Z","is_usable":true,"invited_users":[]},"url":"https://minchatapp.com/invite/I7TSXMCTZX"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/invites/personal/rotate":{"post":{"tags":["Users"],"operationId":"POST--api-invites-personal-rotate","summary":"Rotate the personal invite","description":"Rate limit: 20/10 min.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/invites/{invite}":{"delete":{"tags":["Users"],"operationId":"DELETE--api-invites-invite","summary":"Revoke an invite","description":"403 for someone else's invite.","security":[{"bearerAuth":[]}],"parameters":[{"name":"invite","in":"path","required":true,"description":"Invite id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations","summary":"List conversations","description":"All conversations of the user (no pagination), newest activity first. `type`: `private`, `group`, `channel`; Saved Messages is a private chat with yourself. Includes the last message preview, unread and unread-mention counters, mute state, draft and number of scheduled messages.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":1,"name":"Design team","type":"group","peer_user_id":null,"history_ttl":0,"noforwards":false,"my_noforwards":false,"peer_noforwards":false,"blocked":false,"avatar":null,"can_send_messages":true,"username":null,"visibility":"public","share_url":null,"last_message":{"id":28,"content":"OK","body":"OK","attachments":[],"created_at":"2026-10-21T06:46:11.000000Z","user":"Gleb Orlov","user_id":4,"type":"text","preview_code":null,"card":null},"unread_count":0,"unread_mentions_count":0,"muted_until":null,"joined_at":"2026-10-20T11:12:46+00:00","draft":null,"scheduled_count":3},{"id":2,"name":"MinChat News","type":"channel","peer_user_id":null,"history_ttl":0,"noforwards":false,"my_noforwards":false,"peer_noforwards":false,"blocked":false,"avatar":null,"can_send_messages":true,"username":"minchat_news","visibility":"public","share_url":"https://minchatapp.com/c/minchat_news","last_message":{"id":13,"content":"Version 1.0.41 is out: more stable calls and chat folders 📁","body":"Version 1.0.41 is out: more stable calls and chat folders 📁","attachments":[],"created_at":"2026-10-20T11:12:47.000000Z","user":"MinChat News","user_id":1,"type":"text","preview_code":null,"card":null},"unread_count":0,"unread_mentions_count":0,"muted_until":null,"joined_at":"2026-10-20T11:12:47+00:00","draft":null,"scheduled_count":0}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Conversations"],"operationId":"POST--api-conversations","summary":"Create a group or channel","description":"Creator becomes owner. A public channel requires `username`; a private one is joined only through invite links. Realtime: `ConversationCreated`. Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Title. Rules: max 255 chars."},"description":{"type":"string","description":"Description. Rules: max 500 chars."},"type":{"type":"string","description":"group or channel. Rules: one of: group, channel."},"visibility":{"type":"string","description":"public (default) or private. Rules: one of: public, private."},"username":{"type":"string","description":"Public @username (required for a public channel). Rules: max 32 chars."}},"required":["name","type"]},"example":{"name":"Release notes","type":"channel","visibility":"public","username":"release_notes","description":"Changelog"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":6,"name":"Release notes","type":"channel","avatar":null,"description":"Changelog","username":"release_notes","visibility":"public","share_url":"https://minchatapp.com/c/release_notes","last_message":null,"unread_count":0}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation","summary":"Get a conversation with messages","description":"Conversation card plus a page of messages (cursor pagination, ascending by id). Without cursors returns the latest `limit` messages **and marks the chat read** (unless `peek` is passed). `before_id` — older history; `after_id` — catch-up after being offline (does not mark read; loop while `has_more` is true moving the cursor to the max id); `around_id` — a window centred on a message (jump to reply / search hit).","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50). Rules: 1–100.","schema":{"type":"integer"}},{"name":"before_id","in":"query","required":false,"description":"Messages with id < before_id.","schema":{"type":"integer"}},{"name":"after_id","in":"query","required":false,"description":"Messages with id > after_id.","schema":{"type":"integer"}},{"name":"around_id","in":"query","required":false,"description":"Window around this message.","schema":{"type":"integer"}},{"name":"peek","in":"query","required":false,"description":"Do not mark the chat as read.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"conversation":{"id":1,"name":"Design team","type":"group","avatar":null,"user_role":"admin","is_owner":true,"can_send_messages":true,"members_can_pin":false,"can_pin":true,"can_manage_subscribers":false,"username":null,"visibility":"public","share_url":null,"pinned_messages":[],"peer_user_id":null,"unread_count":0,"unread_mentions_count":0,"active_call":null,"joined_at":"2026-10-20T11:12:46+00:00","history_ttl":0,"noforwards":false,"my_noforwards":false,"peer_noforwards":false,"blocked":false,"can_change_policy":true,"members_read_at":{"1":"2026-10-22T09:06:13+00:00","2":null,"3":null,"4":null}},"messages":[{"id":41,"content":"Font is slightly bolder on Windows","type":"text","attachments":[],"link_previews":null,"reply_to":null,"user":{"id":3,"name":"Vera Kotova","avatar":null,"is_channel":false,"is_bot":false,"username":null},"created_at":"2026-10-21T06:46:11.000000Z","edited_at":null,"can_delete":false,"is_own":false,"read_receipt":null,"client_id":null,"forwarded_from":null,"permalink":null,"system":null,"card":null,"group_id":null,"mentions":[],"silent":false,"expires_at":null,"reply_markup":null,"reactions":[]},{"id":42,"content":"Will fix","type":"text","attachments":[],"link_previews":null,"reply_to":null,"user":{"id":2,"name":"Boris Petrov","avatar":null,"is_channel":false,"is_bot":false,"username":"boris_p"},"created_at":"2026-10-21T06:46:11.000000Z","edited_at":null,"can_delete":false,"is_own":false,"read_receipt":null,"client_id":null,"forwarded_from":null,"permalink":null,"system":null,"card":null,"group_id":null,"mentions":[],"silent":false,"expires_at":null,"reply_markup":null,"reactions":[]},{"id":43,"content":"Thanks everyone!","type":"text","attachments":[],"link_previews":null,"reply_to":null,"user":{"id":4,"name":"Gleb Orlov","avatar":null,"is_channel":false,"is_bot":false,"username":null},"created_at":"2026-10-21T06:46:11.000000Z","edited_at":null,"can_delete":false,"is_own":false,"read_receipt":null,"client_id":null,"forwarded_from":null,"permalink":null,"system":null,"card":null,"group_id":null,"mentions":[],"silent":false,"expires_at":null,"reply_markup":null,"reactions":[]}],"has_more":true}}}},"404":{"description":"404","content":{"application/json":{"example":{"success":false,"code":"common.not_found","error":"Not found","message":"Not found"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation","summary":"Edit group/channel settings","description":"Owner or admin. Multipart when sending `avatar`. `avatar_clear=1` removes the avatar. A channel username can change once per 14 days. Private chats → 400. Realtime: `ConversationUpdated` to every member.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name / title. Rules: max 255 chars."},"description":{"type":"string","description":"Description. Rules: max 500 chars."},"avatar":{"type":"string","format":"binary","description":"Image file (multipart). Rules: max 5 MB."},"avatar_clear":{"type":"string","description":"1 to remove the avatar."},"members_can_pin":{"type":"boolean","description":"Groups: members may pin messages."},"visibility":{"type":"string","description":"public / private. Rules: one of: public, private."},"username":{"type":"string","description":"Public @username. Rules: max 32 chars."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":2,"name":"MinChat News","avatar":null,"description":"Product updates","type":"channel","user_role":"admin","is_owner":true,"can_send_messages":true,"members_can_pin":false,"can_pin":true,"can_manage_subscribers":true,"username":"minchat_news","visibility":"public","share_url":"https://minchatapp.com/c/minchat_news","hidden_from_discovery":false,"history_ttl":604800}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Conversations"],"operationId":"DELETE--api-conversations-conversation","summary":"Delete a group/channel","description":"Owner only, requires `confirm=DELETE`. Realtime: `ConversationDeleted`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","description":"Literal DELETE. Rules: one of: DELETE."}},"required":["confirm"]},"example":{"confirm":"DELETE"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/group":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-group","summary":"Create a group with members","description":"Adds the listed users and posts a system message. Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name / title. Rules: max 255 chars."},"description":{"type":"string","description":"Description. Rules: max 500 chars."},"user_ids":{"type":"array","items":{},"description":"Members to add. Rules: min 1 items."}},"required":["name","user_ids"]},"example":{"name":"Weekend","user_ids":[2,3]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":7,"name":"Weekend","type":"group","avatar":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/private":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-private","summary":"Open a private chat","description":"Creates or returns the 1-on-1 chat with `user_id`. 400 for yourself (use `/saved`). Rate limit: 30/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","description":"Peer user id. Rules: must exist (users)."}},"required":["user_id"]},"example":{"user_id":2}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":3,"name":"Boris Petrov","type":"private","avatar":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/saved":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-saved","summary":"Open Saved Messages","description":"Creates or returns your Saved Messages chat. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":4,"name":"Saved Messages","type":"saved","peer_user_id":1,"avatar":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/popular-channels":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-popular-channels","summary":"Popular channels","description":"Up to 10 discoverable public channels the user is not in. Alias: `/random-channels`.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":2,"name":"MinChat News","type":"channel","description":"Product updates","avatar":null,"username":"minchat_news","visibility":"public","members_count":3,"is_joined":false,"share_url":"https://minchatapp.com/c/minchat_news","last_activity_at":"2026-10-20T11:12:47+00:00"}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/random-channels":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-random-channels","summary":"Popular channels (alias)","description":"Same as `/popular-channels`.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":2,"name":"MinChat News","type":"channel","description":"Product updates","avatar":null,"username":"minchat_news","visibility":"public","members_count":3,"is_joined":false,"share_url":"https://minchatapp.com/c/minchat_news","last_activity_at":"2026-10-20T11:12:47+00:00"}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/search":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-search","summary":"Search public channels","description":"Exact `@username` first, then by name. Up to 20. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":true,"description":"Search string. Rules: min 2 chars.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":2,"name":"MinChat News","type":"channel","description":"Product updates","avatar":null,"username":"minchat_news","visibility":"public","members_count":3,"is_joined":true,"share_url":"https://minchatapp.com/c/minchat_news","last_activity_at":"2026-10-20T11:12:47+00:00"}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/username-available":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-username-available","summary":"Check a channel username","description":"Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"query","required":true,"description":"Username. Rules: max 32 chars.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"username":"design_news","available":true,"reason":null,"code":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/resolve/{username}":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-resolve-username","summary":"Resolve a channel by username","description":"Public channel card. 404 for private/hidden channels.","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"path","required":true,"description":"Channel username.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":2,"name":"MinChat News","type":"channel","description":"Product updates","avatar":null,"username":"minchat_news","visibility":"public","members_count":3,"is_joined":true,"share_url":"https://minchatapp.com/c/minchat_news","last_activity_at":"2026-10-20T11:12:47+00:00"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/preview":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-preview","summary":"Preview a channel without joining","description":"404 for private channels you are not in, 403 when banned.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":2,"name":"MinChat News","type":"channel","description":"Product updates","avatar":null,"username":"minchat_news","visibility":"public","members_count":3,"is_joined":true,"share_url":"https://minchatapp.com/c/minchat_news","last_activity_at":"2026-10-20T11:12:47+00:00"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/info":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-info","summary":"Conversation details and members","description":"Metadata, owner, members (up to 50 per page, `members_has_more`), message stats, pinned messages. In channels subscribers see only staff. Pagination: `after` (last member id) + `after_role`; filter with `q`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"after","in":"query","required":false,"description":"Cursor: last member id of the previous page.","schema":{"type":"integer"}},{"name":"after_role","in":"query","required":false,"description":"Role of that member (cursor part).","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Filter members by name.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":1,"name":"Design team","description":"Release discussions","type":"group","avatar":null,"is_owner":true,"user_role":"admin","members_can_pin":false,"can_pin":true,"can_manage_subscribers":false,"username":null,"visibility":"public","share_url":null,"pinned_messages":[],"owner":{"id":1,"name":"Anna Smith","avatar":null},"members":[{"id":1,"name":"Anna Smith","avatar":null,"role":"admin","joined_at":"2026-10-20 11:12:46","last_seen_at":"2026-10-22T09:06:13+00:00","status_hidden":false,"last_seen_bucket":null},{"id":2,"name":"Boris Petrov","avatar":null,"role":"member","joined_at":"2026-10-20 11:12:46","last_seen_at":"2026-10-21T06:46:11+00:00","status_hidden":false,"last_seen_bucket":null}],"members_count":4,"members_has_more":false,"message_stats":{"total":34,"text":26,"media":3,"files":2},"created_at":"2026-10-20T11:12:46.000000Z","peer_phone":null,"peer_about":null,"peer_birthday":null,"history_ttl":0,"noforwards":false,"my_noforwards":false,"peer_noforwards":false,"blocked":false,"can_change_policy":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/join":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-join","summary":"Subscribe to a public channel","description":"400 for non-channels, 404 for private, 403 when banned. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation":{"id":2,"name":"MinChat News","type":"channel","avatar":null,"description":"Product updates","username":"minchat_news","visibility":"public","share_url":"https://minchatapp.com/c/minchat_news","last_message":null,"unread_count":0}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/leave":{"delete":{"tags":["Conversations"],"operationId":"DELETE--api-conversations-conversation-leave","summary":"Leave a conversation","description":"Channel: subscribers leave; an owner with other members gets 409 (transfer first); a sole owner deletes the channel. Private: `delete_for_all=1` deletes the chat for both. Group: if the owner leaves, ownership passes to an admin/moderator.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"delete_for_all","in":"query","required":false,"description":"Private chats: delete for both sides.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/members":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-members","summary":"Add a member","description":"Groups, or channel staff. Bots are added the same way (by the bot's user id). In channels this also lifts a ban. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","description":"User id. Rules: must exist (users)."}},"required":["user_id"]},"example":{"user_id":42}}}},"responses":{"400":{"description":"Error","content":{"application/json":{"example":{"success":false,"code":"conversation.already_member","error":"User is already in the conversation","message":"User is already in the conversation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/members/{userId}":{"delete":{"tags":["Conversations"],"operationId":"DELETE--api-conversations-conversation-members-userid","summary":"Remove a member","description":"Cannot remove the owner or someone with an equal/higher role. In channels a kick also bans.","security":[{"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"User id.","schema":{"type":"string"}},{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/members/{userId}/role":{"patch":{"tags":["Conversations"],"operationId":"PATCH--api-conversations-conversation-members-userid-role","summary":"Change a member role","description":"Owner can grant admin/moderator; admin can grant moderator only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"User id.","schema":{"type":"string"}},{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","description":"member, moderator or admin. Rules: one of: member, moderator, admin."}},"required":["role"]},"example":{"role":"moderator"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"role":"moderator"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/owner":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-owner","summary":"Transfer ownership","description":"Current owner only; the new owner must be a member. The old owner stays admin.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","description":"User id. Rules: must exist (users)."}},"required":["user_id"]},"example":{"user_id":2}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/bans":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-bans","summary":"Channel bans","description":"Staff only. Pagination: `after` = `ban_id` of the last item, `limit` 1–50.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"after","in":"query","required":false,"description":"Cursor (ban_id).","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Page size, default 50. Rules: 1–50.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"bans":[],"bans_has_more":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/bans/{userId}":{"delete":{"tags":["Conversations"],"operationId":"DELETE--api-conversations-conversation-bans-userid","summary":"Unban","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"User id.","schema":{"type":"string"}},{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/mute":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-mute","summary":"Mute / unmute","description":"Exactly one of `duration` (`1h`, `8h`, `forever`) or `until` (ISO 8601, ≤ 1 year). Empty body unmutes. Mentions and replies to you still notify. Realtime: `ConversationMuted` to your other devices.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"duration":{"type":"string","description":"1h, 8h, forever or null."},"until":{"type":"string","format":"date-time","description":"Mute until this moment."}}},"example":{"duration":"8h"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"conversation_id":1,"muted_until":"2026-10-22T17:06:13+00:00"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/ttl":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-ttl","summary":"Set the auto-delete timer","description":"New messages expire after `period` seconds (0 = off). A system message is posted.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"integer","description":"Seconds. Rules: ≥ 0; ≤ 31536000."}},"required":["period"]},"example":{"period":86400}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"conversation_id":1,"history_ttl":86400}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/noforwards":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-noforwards","summary":"Restrict forwarding","description":"Disables forwarding/saving of messages from this chat.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Turn on / off."}},"required":["enabled"]},"example":{"enabled":true}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"conversation_id":1,"enabled":true,"scope":"chat"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/read":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-read","summary":"Mark as read","description":"Updates `last_read_at`; realtime `ParticipantRead`. In channels also counts views.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/activity":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-activity","summary":"Send typing / recording status","description":"`action`: `typing`, `record_audio` (repeat while active) or `cancel`. Not available in channels. Realtime: `UserActivity`. Rate limit: 120/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","description":"Activity type. Rules: one of: typing, record_audio, cancel."}},"required":["action"]},"example":{"action":"typing"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/draft":{"put":{"tags":["Conversations"],"operationId":"PUT--api-conversations-conversation-draft","summary":"Save a draft","description":"Synced across devices; `content:null` clears. Realtime: `DraftUpdated` to your other devices. Rate limit: 120/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Message text. Rules: present (may be null); max 4000 chars."},"reply_to_message_id":{"type":"integer","nullable":true,"description":"Message being replied to. Rules: ≥ 1."}},"required":["content"]},"example":{"content":"Draft text","reply_to_message_id":null}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"conversation_id":1,"draft":{"content":"Draft text","reply_to_message_id":null,"updated_at":"2026-10-22T09:06:13+00:00"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/stats":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-stats","summary":"Channel statistics","description":"Staff only: subscribers, joins for 7/30 days, views, top posts.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"subscribers":3,"joined_7d":3,"joined_30d":3,"views_7d":0,"top_posts":[{"id":13,"content":"Version 1.0.41 is out: more stable calls and chat folders 📁","views_count":0,"created_at":"2026-10-20T11:12:47.000000Z"},{"id":14,"content":"What should we build next?","views_count":0,"created_at":"2026-10-20T11:12:47.000000Z"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/media":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-media","summary":"Shared media","description":"Gallery of attachments. `type`: `image`, `video`, `media` (photo+video), `file` (documents and non-voice audio), `voice`, `link`. Offset pagination counted in **attachments**: use `next_offset`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Filter. Rules: one of: image, video, file, media, voice, link.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size (default 20). Rules: 1–200.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset in attachments. Rules: ≥ 0.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"media":[{"id":"f6cbddbe-fc10-4ab0-a406-b839184ffd08","type":"image","url":"https://minchatapp.com/storage/media/be/d0/bed02c0b4bd0799b771b43ef5e5abb4e52eab27d447472966263f53e53afbbe8.jpg","name":"photo3.jpg","size":13485,"mime_type":"image/jpeg","is_voice":false,"message_id":6,"created_at":"2026-10-20T11:12:46.000000Z","user":{"id":3,"name":"Vera Kotova","avatar":null}},{"id":"08c33049-f1a1-4e88-9e44-79a6bcb8f8e6","type":"image","url":"https://minchatapp.com/storage/media/32/fd/32fdfe2a3c825ea2d281066b119b3c12a06b9ed06a640e64eb748baf8ffee54f.jpg","name":"photo1.jpg","size":24374,"mime_type":"image/jpeg","is_voice":false,"message_id":5,"created_at":"2026-10-20T11:12:46.000000Z","user":{"id":2,"name":"Boris Petrov","avatar":null}}],"has_more":true,"next_offset":2}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/pins":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-pins","summary":"Pin a message","description":"Up to 5 pins. `notify` posts a notification. Realtime: `ConversationPinsUpdated`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message_id":{"type":"integer","description":"Message id. Rules: must exist (messages)."},"notify":{"type":"string","description":"Notify members."}},"required":["message_id"]},"example":{"message_id":45}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"pinned_messages":[{"id":45,"content":"Hello @Boris Petrov! (edited)","type":"text","attachments":[],"user":{"id":1,"name":"Anna Smith","avatar":null},"created_at":"2026-10-22T09:06:13.000000Z","pinned_at":"2026-10-22T09:06:13+00:00","pinned_by":1}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/pins/{message}":{"delete":{"tags":["Conversations"],"operationId":"DELETE--api-conversations-conversation-pins-message","summary":"Unpin a message","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}},{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"pinned_messages":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/invite-links":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-invite-links","summary":"List invite links","description":"Staff of groups/channels.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"links":[{"id":2,"code":"z8qxbjlhmblg","name":null,"url":"https://minchatapp.com/join/z8qxbjlhmblg","max_uses":0,"uses_count":0,"expires_at":null,"revoked_at":null,"created_at":"2026-10-20T11:13:00+00:00","is_usable":true},{"id":1,"code":"dgpnlk9opbmw","name":"Contractors","url":"https://minchatapp.com/join/dgpnlk9opbmw","max_uses":10,"uses_count":0,"expires_at":"2026-10-27T11:13:00+00:00","revoked_at":null,"created_at":"2026-10-20T11:13:00+00:00","is_usable":true}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-invite-links","summary":"Create an invite link","description":"`max_uses` 0 = unlimited. Use either `expires_at` or `expires_in` (seconds, 60 s – 1 year). Rate limit: 20/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"max_uses":{"type":"integer","description":"Maximum number of uses. Rules: ≥ 0; ≤ 100000."},"expires_at":{"type":"string","format":"date-time","description":"Expiry moment (ISO 8601). Rules: after now."},"expires_in":{"type":"integer","description":"Lifetime in seconds. Rules: ≥ 60; ≤ 31536000."},"name":{"type":"string","description":"Name / title. Rules: max 64 chars."}}},"example":{"name":"Friends","max_uses":10,"expires_in":86400}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"example":{"id":3,"code":"p4rkrskpstdq","name":"Friends","url":"https://minchatapp.com/join/p4rkrskpstdq","max_uses":10,"uses_count":0,"expires_at":"2026-10-23T09:06:13+00:00","revoked_at":null,"created_at":"2026-10-22T09:06:13+00:00","is_usable":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/invite-links/{inviteLink}":{"delete":{"tags":["Conversations"],"operationId":"DELETE--api-conversations-conversation-invite-links-invitelink","summary":"Revoke an invite link","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"inviteLink","in":"path","required":true,"description":"Invite link id.","schema":{"type":"string"}},{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/invite-links/{inviteLink}/regenerate":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-invite-links-invitelink-regenerate","summary":"Regenerate an invite link","description":"Revokes the link and creates a new code with the same settings. Rate limit: 20/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"inviteLink","in":"path","required":true,"description":"Invite link id.","schema":{"type":"string"}},{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"example":{"id":4,"code":"wqbefok5d6op","name":"Friends","url":"https://minchatapp.com/join/wqbefok5d6op","max_uses":10,"uses_count":0,"expires_at":"2026-10-23T09:06:13+00:00","revoked_at":null,"created_at":"2026-10-22T09:12:50+00:00","is_usable":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/invite-links/{code}":{"get":{"tags":["Conversations"],"operationId":"GET--api-invite-links-code","summary":"Preview an invite link","description":"Public (Bearer optional): chat title, avatar, member count. Rate limit: 60/min.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"code","in":"path","required":true,"description":"Invite code.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"code":"p4rkrskpstdq","url":"https://minchatapp.com/join/p4rkrskpstdq","conversation":{"id":null,"type":"group","name":"Design team","avatar":null,"description":"Release discussions","members_count":5},"is_member":false,"expires_at":"2026-10-23T09:06:13+00:00"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/join/{code}":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-join-code","summary":"Join by invite link","description":"Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"code","in":"path","required":true,"description":"Invite code.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"already_member":true,"conversation":{"id":1,"name":"Design team","type":"group","avatar":null,"description":"Release discussions","username":null,"visibility":"public","share_url":null,"last_message":null,"unread_count":0}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/mention-targets":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-mention-targets","summary":"Mention suggestions","description":"Members to suggest after `@` (channels: staff only). `q` filters by name/username.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Filter.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"members":[{"id":2,"name":"Boris Petrov","username":"boris_p","avatar":null,"role":"member"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/mentions/unread":{"get":{"tags":["Conversations"],"operationId":"GET--api-conversations-conversation-mentions-unread","summary":"Unread mentions","description":"Ids of messages that mention you and are not read yet (for the “@” jump button).","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"message_ids":[],"unread_mentions_count":0}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/mentions/read":{"post":{"tags":["Conversations"],"operationId":"POST--api-conversations-conversation-mentions-read","summary":"Mark mentions read","description":"Without `message_ids` marks all. Realtime: `MentionsUpdated`. Rate limit: 120/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"message_ids":{"type":"array","items":{},"description":"Message ids; omit to mark all. Rules: max 200 items."}}},"example":{"message_ids":[23]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"unread_mentions_count":0}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/messages":{"post":{"tags":["Messages"],"operationId":"POST--api-conversations-conversation-messages","summary":"Send a message","description":"JSON or multipart (for `attachments[]`). Needs text, an attachment, a sticker (`emoji_id`), a forward, a poll or a to-do list — otherwise 422 `message.empty`. Type is derived: `text`, `media` (image/video/audio), `file`, `sticker`, `poll`, `todo`. `client_id` makes retries idempotent. `mentions` are user ids picked from `/mention-targets`; `silent` delivers push notifications without sound. In channels only staff can post (403). Realtime: `MessageSent`, later `LinkPreviewsReady` for links. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Text (≤ 4000). Light markup rendered by clients: bold, *italic*, __underline__, ~strike~, ||spoiler||, inline code in backticks, code blocks in triple backticks; URLs are auto-linked. Rules: max 4000 chars."},"emoji_id":{"type":"integer","description":"Send a custom emoji as a sticker. Rules: must exist (emojis)."},"forward_from_message_id":{"type":"integer","description":"Forward this message; content becomes a comment. Rules: must exist (messages)."},"hide_sender":{"type":"string","description":"With a forward: hide the original author."},"attachments":{"type":"array","items":{},"description":"Files (multipart attachments[]). Rules: max 10 items."},"reply_to_message_id":{"type":"integer","description":"Reply to a message of this chat. Rules: must exist (messages — same conversation)."},"client_id":{"type":"string","description":"Idempotency key (UUID). Rules: max 64 chars."},"group_id":{"type":"string","description":"Album id: messages with the same id are shown as one album. Rules: max 64 chars."},"poll":{"type":"array","items":{},"description":"Create a poll."},"todo":{"type":"array","items":{},"description":"Create a to-do list."},"mentions":{"type":"array","items":{},"description":"Mentioned user ids. Rules: max 50 items."},"silent":{"type":"boolean","description":"Send without sound."},"is_voice":{"type":"boolean","description":"Mark an audio attachment as a voice message (is_voice or is_voice.{index})."},"waveform_data":{"type":"array","items":{},"description":"Voice waveform, 0..1 samples (array or JSON string)."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":45,"conversation_id":1,"content":"Hello @Boris Petrov!","type":"text","attachments":[],"link_previews":null,"reply_to":null,"edited_at":null,"user":{"id":1,"name":"Anna Smith","avatar":null,"is_channel":false,"is_bot":false,"username":"anna_s"},"created_at":"2026-10-22T09:06:13.000000Z","can_delete":true,"is_own":true,"read_receipt":"delivered","client_id":"5b1f0c1e-7c1a-4f7e-9a51-3c2f8d0e1a11","reactions":[],"forwarded_from":null,"permalink":null,"system":null,"card":null,"group_id":null,"mentions":[2],"silent":false,"reply_markup":null,"expires_at":null,"views_count":null}}}},"422":{"description":"empty","content":{"application/json":{"example":{"success":false,"code":"message.empty","error":"Message cannot be empty","message":"Message cannot be empty"}}}},"403":{"description":"channel403","content":{"application/json":{"example":{"success":false,"code":"message.channel_write_forbidden","error":"Only the owner and admins can post in the channel","message":"Only the owner and admins can post in the channel"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}":{"patch":{"tags":["Messages"],"operationId":"PATCH--api-messages-message","summary":"Edit a message","description":"Author only, while editing is allowed. Realtime: `MessageUpdated`. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Message text. Rules: max 4000 chars."}},"required":["content"]},"example":{"content":"Hello again (edited)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":45,"content":"Hello @Boris Petrov! (edited)","edited_at":"2026-10-22T09:06:13.000000Z","link_previews":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Messages"],"operationId":"DELETE--api-messages-message","summary":"Delete a message","description":"`delete_for_all=1` (author / staff) deletes for everyone, otherwise only for you. Realtime: `MessageDeleted`. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}},{"name":"delete_for_all","in":"query","required":false,"description":"Delete for everyone.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/messages/search":{"get":{"tags":["Messages"],"operationId":"GET--api-conversations-conversation-messages-search","summary":"Search in a conversation","description":"`q` 2–100 chars; an empty `q` is allowed only with a filter. Matches text, poll options and to-do items. 20 results per page, newest first; paginate with `before_id`. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Query.","schema":{"type":"string"}},{"name":"from_user_id","in":"query","required":false,"description":"Only messages of this author.","schema":{"type":"integer"}},{"name":"type","in":"query","required":false,"description":"media, file or sticker.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"From date (inclusive).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"To date (inclusive).","schema":{"type":"string","format":"date"}},{"name":"before_id","in":"query","required":false,"description":"Cursor.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"messages":[{"id":20,"content":"Release checklist: https://example.com/release-checklist","type":"text","attachments":[],"link_previews":[{"url":"https://example.com/release-checklist","provider":"generic","title":"example.com","description":null,"image":null,"site_name":"example.com","embed_url":null,"embed_html":null,"video_url":null,"video_type":null,"video_width":null,"video_height":null,"accessible":true,"meta":[]}],"reply_to":null,"user":{"id":3,"name":"Vera Kotova","avatar":null,"is_channel":false,"is_bot":false,"username":null},"created_at":"2026-10-20T11:12:47.000000Z","edited_at":null,"can_delete":false,"is_own":false,"read_receipt":null,"client_id":null,"forwarded_from":null,"permalink":null,"system":null,"card":null,"group_id":null,"mentions":[],"silent":false,"expires_at":null,"reply_markup":null,"reactions":[]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/search":{"get":{"tags":["Messages"],"operationId":"GET--api-messages-search","summary":"Search across all chats","description":"Same rules as the chat search plus `conversation_id`; `type`: `photo`/`image`, `video`, `media`, `file`, `audio`, `voice`, `link`. 30 per page; continue with `next_before_id`. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"description":"Query.","schema":{"type":"string"}},{"name":"conversation_id","in":"query","required":false,"description":"Limit to one chat.","schema":{"type":"integer"}},{"name":"from_user_id","in":"query","required":false,"description":"Author (alias sender_id).","schema":{"type":"integer"}},{"name":"type","in":"query","required":false,"description":"Attachment type filter.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"From date.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"To date.","schema":{"type":"string","format":"date"}},{"name":"before_id","in":"query","required":false,"description":"Cursor.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"messages":[{"id":21,"conversation_id":4,"content":"Release checklist: https://example.com/release-checklist","type":"text","created_at":"2026-10-20T11:12:47+00:00","user":{"id":1,"name":"Anna Smith"},"attachment":null,"conversation":{"id":4,"type":"saved","name":"Saved Messages"}},{"id":20,"conversation_id":1,"content":"Release checklist: https://example.com/release-checklist","type":"text","created_at":"2026-10-20T11:12:47+00:00","user":{"id":3,"name":"Vera Kotova"},"attachment":null,"conversation":{"id":1,"type":"group","name":"Design team"}}],"next_before_id":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/reaction":{"put":{"tags":["Messages"],"operationId":"PUT--api-messages-message-reaction","summary":"Set a reaction","description":"One reaction per user per message; replaces the previous one. Realtime: `MessageReactionUpdated`. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emoji_id":{"type":"integer","description":"Emoji id (see emoji sets). Rules: must exist (emojis)."}},"required":["emoji_id"]},"example":{"emoji_id":1}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"reactions":[{"emoji_id":1,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"thumbsup","kind":"unicode","unicode":"👍","image_url":null,"count":1,"me":true,"user_ids":[1]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Messages"],"operationId":"DELETE--api-messages-message-reaction","summary":"Remove my reaction","description":"Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"reactions":[]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/reactions":{"get":{"tags":["Messages"],"operationId":"GET--api-messages-message-reactions","summary":"Who reacted","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"groups":[{"emoji_id":1,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"thumbsup","kind":"unicode","unicode":"👍","image_url":null,"count":1,"me":true,"users":[{"id":1,"name":"Anna Smith","avatar":null}]}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/poll":{"post":{"tags":["Messages"],"operationId":"POST--api-messages-message-poll","summary":"Vote in a poll","description":"`options` — indexes (0–9). Empty array retracts. The author can close the poll with `closed:true`. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"array","items":{},"description":"Chosen option indexes; empty to retract. Rules: max 10 items."},"closed":{"type":"boolean","description":"Author: close the poll."}}},"example":{"options":[0]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":47,"conversation_id":1,"content":"Lunch?","type":"poll","attachments":[],"link_previews":null,"reply_to":null,"edited_at":null,"user":{"id":1,"name":"Anna Smith","avatar":null,"is_channel":false,"is_bot":false,"username":"anna_s"},"created_at":"2026-10-22T09:06:13.000000Z","can_delete":true,"is_own":true,"read_receipt":"delivered","client_id":null,"reactions":[],"forwarded_from":null,"permalink":null,"system":null,"card":{"poll":{"question":"Lunch?","options":["Pizza","Sushi"],"multiple":false,"quiz":false,"anonymous":true,"closed":false,"correct":[],"votes":[[1]],"me_token":-100004975}},"group_id":null,"mentions":[],"silent":false,"reply_markup":null,"expires_at":null,"views_count":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/todo":{"post":{"tags":["Messages"],"operationId":"POST--api-messages-message-todo","summary":"Update a to-do list","description":"Mark item ids completed/incomplete; `append` adds items (if allowed). Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"array","items":{},"description":"Item ids to mark done. Rules: present (may be null); max 30 items."},"incompleted":{"type":"array","items":{},"description":"Item ids to mark not done. Rules: present (may be null); max 30 items."},"append":{"type":"array","items":{},"description":"New item texts. Rules: max 10 items."}},"required":["completed","incompleted"]},"example":{"completed":[1],"incompleted":[]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":48,"conversation_id":1,"content":"Release","type":"todo","attachments":[],"link_previews":null,"reply_to":null,"edited_at":null,"user":{"id":1,"name":"Anna Smith","avatar":null,"is_channel":false,"is_bot":false,"username":"anna_s"},"created_at":"2026-10-22T09:06:13.000000Z","can_delete":true,"is_own":true,"read_receipt":"delivered","client_id":null,"reactions":[],"forwarded_from":null,"permalink":null,"system":null,"card":{"todo":{"title":"Release","items":[{"id":1,"text":"Build"},{"id":2,"text":"Publish"}],"others_can_append":false,"others_can_complete":true,"completed":{"1":[1]}}},"group_id":null,"mentions":[],"silent":false,"reply_markup":null,"expires_at":null,"views_count":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/readers":{"get":{"tags":["Messages"],"operationId":"GET--api-messages-message-readers","summary":"Who read a message","description":"Own messages in groups only (400 for private chats and channels).","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"readers":[],"pending":[{"id":2,"name":"Boris Petrov","avatar":null,"read_at":null},{"id":3,"name":"Vera Kotova","avatar":null,"read_at":null},{"id":4,"name":"Gleb Orlov","avatar":null,"read_at":null}],"readers_count":0,"pending_count":3}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/save":{"post":{"tags":["Messages"],"operationId":"POST--api-messages-message-save","summary":"Save to Saved Messages","description":"Copies the message into Saved Messages as a forward. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"conversation_id":4,"message":{"id":49,"conversation_id":4,"content":"Thanks everyone!","type":"text","attachments":[],"link_previews":null,"reply_to":null,"edited_at":null,"user":{"id":1,"name":"Anna Smith","avatar":null,"is_channel":false,"is_bot":false,"username":"anna_s"},"created_at":"2026-10-22T09:06:13.000000Z","can_delete":true,"is_own":true,"read_receipt":"delivered","client_id":"save-43-UNLWeWWFiM","reactions":[],"forwarded_from":{"conversation_id":1,"conversation_name":"Design team","message_id":43,"user":{"id":4,"name":"Gleb Orlov"},"created_at":"2026-10-21T06:46:11+00:00","hidden_sender":false,"is_channel":false},"permalink":null,"system":null,"card":null,"group_id":null,"mentions":[],"silent":false,"reply_markup":null,"expires_at":null,"views_count":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/callback":{"post":{"tags":["Messages"],"operationId":"POST--api-messages-message-callback","summary":"Press an inline button","description":"For bot messages with `reply_markup`: sends a `callback_query` update to the bot. `answer` is filled only if the bot already answered. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"callback_data of the pressed button. Rules: max 64 chars."}},"required":["data"]},"example":{"data":"city:moscow"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"callback_query_id":"1","answer":null}}}},"422":{"description":"bad","content":{"application/json":{"example":{"success":false,"code":"validation.failed","error":"The given data was invalid.","message":"The given data was invalid.","errors":{"data":["Unknown callback_data for this message."]}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{message}/reminder":{"post":{"tags":["Messages"],"operationId":"POST--api-messages-message-reminder","summary":"Remind me about a message","description":"`remind_at` from +1 minute to +1 year. When due: push (`type=reminder`) and realtime `MessageReminderDue`. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"message","in":"path","required":true,"description":"Message id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remind_at":{"type":"string","format":"date-time","description":"When to remind (ISO 8601)."}},"required":["remind_at"]},"example":{"remind_at":"2026-11-02T10:00:00+03:00"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"example":{"reminder":{"id":3,"message_id":45,"conversation_id":1,"conversation_name":"Design team","sender_name":"Anna Smith","preview":"Hello @Boris Petrov! (edited)","remind_at":"2026-11-02T10:00:00+00:00","status":"pending"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/reminders":{"get":{"tags":["Messages"],"operationId":"GET--api-reminders","summary":"My reminders","description":"","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"reminders":[{"id":3,"message_id":45,"conversation_id":1,"conversation_name":"Design team","sender_name":"Anna Smith","preview":"Hello @Boris Petrov! (edited)","remind_at":"2026-11-02T10:00:00+00:00","status":"pending"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/reminders/{reminder}":{"delete":{"tags":["Messages"],"operationId":"DELETE--api-reminders-reminder","summary":"Cancel a reminder","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"reminder","in":"path","required":true,"description":"Reminder id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/scheduled":{"get":{"tags":["Messages"],"operationId":"GET--api-conversations-conversation-scheduled","summary":"Scheduled messages","description":"Your pending scheduled messages in this chat (max 100 per chat).","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"scheduled":[{"id":1,"conversation_id":1,"content":"Reminder: call at 18:00","reply_to_message_id":null,"send_at":"2026-10-20T13:12:47+00:00","status":"pending","error":null,"message_id":null},{"id":2,"conversation_id":1,"content":"Good morning! Please update your task status","reply_to_message_id":null,"send_at":"2026-10-21T12:12:47+00:00","status":"pending","error":null,"message_id":null}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Messages"],"operationId":"POST--api-conversations-conversation-scheduled","summary":"Schedule a message","description":"Text only. Realtime: `ScheduledMessagesUpdated` with the pending count. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Message text. Rules: max 4000 chars."},"send_at":{"type":"string","format":"date-time","description":"When to send (ISO 8601)."},"reply_to_message_id":{"type":"integer","description":"Message being replied to. Rules: must exist (messages — same conversation)."}},"required":["content","send_at"]},"example":{"content":"Standup in 10 minutes","send_at":"2026-11-02T09:00:00+03:00"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"example":{"scheduled":{"id":4,"conversation_id":1,"content":"Standup in 10 minutes","reply_to_message_id":null,"send_at":"2026-11-02T06:00:00+00:00","status":"pending","error":null,"message_id":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/scheduled-messages/{scheduledMessage}":{"patch":{"tags":["Messages"],"operationId":"PATCH--api-scheduled-messages-scheduledmessage","summary":"Edit a scheduled message","description":"Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"scheduledMessage","in":"path","required":true,"description":"Scheduled message id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Message text. Rules: max 4000 chars."},"send_at":{"type":"string","format":"date-time","description":"When to send (ISO 8601)."}}},"example":{"content":"Standup in 5 minutes"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"scheduled":{"id":5,"conversation_id":1,"content":"Standup in 5 minutes","reply_to_message_id":null,"send_at":"2026-11-03T06:00:00+00:00","status":"pending","error":null,"message_id":null}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Messages"],"operationId":"DELETE--api-scheduled-messages-scheduledmessage","summary":"Delete a scheduled message","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"scheduledMessage","in":"path","required":true,"description":"Scheduled message id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/scheduled-messages/{scheduledMessage}/send-now":{"post":{"tags":["Messages"],"operationId":"POST--api-scheduled-messages-scheduledmessage-send-now","summary":"Send a scheduled message now","description":"Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"scheduledMessage","in":"path","required":true,"description":"Scheduled message id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"scheduled":{"id":5,"conversation_id":1,"content":"Standup in 5 minutes","reply_to_message_id":null,"send_at":"2026-11-03T06:00:00+00:00","status":"sent","error":null,"message_id":62}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/storage/{path}":{"get":{"tags":["Media"],"operationId":"GET--storage-path","summary":"Download an attachment","description":"Stable attachment URL as returned in `attachments[].url` (`/storage/media/xx/yy/<sha256>.<ext>`). Send `Authorization: Bearer` (web uses a session / `mc_media` cookie). Available to members of the chat (or everyone for public channels); otherwise 403.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"path","in":"path","required":true,"description":"File path.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/files/{path}":{"get":{"tags":["Media"],"operationId":"GET--api-files-path","summary":"Download an attachment (legacy URL)","description":"Same file access as `/storage/{path}`; kept for URLs cached by older clients.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"path","in":"path","required":true,"description":"File path.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/video-downloads":{"post":{"tags":["Media"],"operationId":"POST--api-video-downloads","summary":"Download a video by URL","description":"Server-side download (YouTube and others via yt-dlp). Returns 202 with a status; follow `VideoDownloadUpdated` or poll. Private/internal URLs are rejected (422). Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Video page URL. Rules: URL; max 2048 chars."},"provider":{"type":"string","description":"Provider hint (default generic). Rules: max 50 chars."}},"required":["url"]},"example":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}}}},"responses":{"422":{"description":"bad","content":{"application/json":{"example":{"success":false,"code":"video.invalid_url","error":"Invalid link","message":"Invalid link"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/video-downloads/{videoDownload}":{"get":{"tags":["Media"],"operationId":"GET--api-video-downloads-videodownload","summary":"Video download status","description":"`status`: `pending`, `downloading`, `completed`, `failed`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"videoDownload","in":"path","required":true,"description":"Video download id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Media"],"operationId":"DELETE--api-video-downloads-videodownload","summary":"Delete a video download","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"videoDownload","in":"path","required":true,"description":"Video download id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/video-downloads/{videoDownload}/stream":{"get":{"tags":["Media"],"operationId":"GET--api-video-downloads-videodownload-stream","summary":"Download the video file","description":"MP4 as attachment, only when `completed`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"videoDownload","in":"path","required":true,"description":"Video download id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/videos/{token}":{"get":{"tags":["Media"],"operationId":"GET--api-videos-token","summary":"Stream a downloaded video","description":"Public by unguessable 48-char token, supports HTTP Range. `?dl=1` forces download. Rate limit: 120/min.","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"Token from the link.","schema":{"type":"string"}},{"name":"dl","in":"query","required":false,"description":"Force download.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/calls/config":{"get":{"tags":["Calls"],"operationId":"GET--api-calls-config","summary":"Call configuration","description":"LiveKit availability, server URL, ring and token TTL.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"enabled":false,"url":"","ring_ttl":45,"token_ttl":3600}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/call/start":{"post":{"tags":["Calls"],"operationId":"POST--api-conversations-conversation-call-start","summary":"Start a call","description":"Private chats and groups (channels → 400). Returns a LiveKit `token`, `url`, `room`, `call_id`. If a call is already active you rejoin (`rejoined:true`). If the callee is unreachable the call ends at once (`callee_reachable:false`, `reason:\"unavailable\"`). Callees get `CallStarted` and an FCM push `type=call`. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"audio (default) or video. Rules: one of: audio, video."}}},"example":{"mode":"video"}}}},"responses":{"503":{"description":"Error","content":{"application/json":{"example":{"success":false,"code":"call.unavailable","error":"Calls are temporarily unavailable","message":"Calls are temporarily unavailable"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/call/token":{"get":{"tags":["Calls"],"operationId":"GET--api-conversations-conversation-call-token","summary":"Join the active call","description":"Token for the active call (answering). 404 `call.none_active` if there is none. Caller gets `CallAnswered`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"503":{"description":"Error","content":{"application/json":{"example":{"success":false,"code":"call.unavailable","error":"Calls are temporarily unavailable","message":"Calls are temporarily unavailable"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/call/token/refresh":{"get":{"tags":["Calls"],"operationId":"GET--api-conversations-conversation-call-token-refresh","summary":"Refresh the call token","description":"New JWT without side effects (no “answered” mark).","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/call/ping":{"post":{"tags":["Calls"],"operationId":"POST--api-conversations-conversation-call-ping","summary":"Call heartbeat","description":"Send every few seconds while in the call; `active:false` means it has ended. Rate limit: 240/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","description":"Call id from call/start / CallStarted."}},"required":["call_id"]},"example":{"call_id":"<uuid>"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/call/stats":{"post":{"tags":["Calls"],"operationId":"POST--api-conversations-conversation-call-stats","summary":"Report call quality","description":"Logged server-side. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","description":"Call id from call/start / CallStarted."},"duration":{"type":"integer","description":"Duration in seconds. Rules: ≥ 0."},"reconnects":{"type":"integer","description":"Number of reconnects. Rules: ≥ 0."},"ice":{"type":"string","description":"Selected ICE candidate type. Rules: max 32 chars."},"loss":{"type":"number","description":"Packet loss, %."},"rtt":{"type":"number","description":"Round-trip time, ms."},"jitter":{"type":"number","description":"Jitter, ms."}}},"example":{"call_id":"<uuid>","duration":120,"rtt":45.2}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/conversations/{conversation}/call/end":{"post":{"tags":["Calls"],"operationId":"POST--api-conversations-conversation-call-end","summary":"End / decline a call","description":"Only the exact `call_id` is ended. Everyone gets `CallEnded`. Rate limit: 60/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"conversation","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","description":"Call id from call/start / CallStarted."},"reason":{"type":"string","description":"End reason. Rules: one of: ended, cancelled, declined, timeout, busy."},"duration":{"type":"integer","description":"Duration in seconds. Rules: ≥ 0."}}},"example":{"call_id":"<uuid>","reason":"ended","duration":120}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/calls/connect-report":{"post":{"tags":["Calls"],"operationId":"POST--api-calls-connect-report","summary":"Report connection diagnostics","description":"ICE/relay diagnostics from clients. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","description":"Call id from call/start / CallStarted. Rules: max 64 chars."},"conversation_id":{"type":"integer","description":"Conversation id. Rules: ≥ 1."},"outcome":{"type":"string","description":"Connection outcome. Rules: one of: connected, failed, ice_failed, timeout, disconnected."},"phase":{"type":"string","description":"Connection phase. Rules: one of: connect, reconnect, in_call."},"platform":{"type":"string","description":"Client platform. Rules: max 32 chars."},"client_version":{"type":"string","description":"App version. Rules: max 64 chars."},"attempts":{"type":"integer","description":"Connection attempts. Rules: ≥ 0; ≤ 50."},"elapsed_ms":{"type":"integer","description":"Time to connect, ms. Rules: ≥ 0; ≤ 3600000."},"candidates_tried":{"type":"array","items":{},"description":"ICE candidate types tried. Rules: max 10 items."},"relay_protocols":{"type":"array","items":{},"description":"TURN protocols tried. Rules: max 5 items."},"selected_local":{"type":"string","description":"Selected local candidate type. Rules: one of: host, srflx, prflx, relay."},"selected_remote":{"type":"string","description":"Selected remote candidate type. Rules: one of: host, srflx, prflx, relay."},"selected_relay_protocol":{"type":"string","description":"Selected relay protocol. Rules: one of: udp, tcp, tls."},"network_type":{"type":"string","description":"Network type (wifi, cellular…). Rules: max 32 chars."},"disconnect_reason":{"type":"string","description":"Disconnect reason. Rules: max 64 chars."},"error":{"type":"string","description":"Error text. Rules: max 500 chars."}},"required":["outcome"]},"example":{"outcome":"connected","phase":"connect","platform":"web","attempts":1,"elapsed_ms":840,"candidates_tried":["host","srflx"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"ok":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/livekit":{"post":{"tags":["Calls"],"operationId":"POST--api-webhooks-livekit","summary":"LiveKit webhook (internal)","description":"Server-to-server endpoint for the LiveKit media server (`room_finished` clears stuck calls). Authenticated by LiveKit's JWT signature; not for third-party use. Rate limit: 120/min. Authenticated by the LiveKit webhook signature.","security":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/push/vapid-key":{"get":{"tags":["Notifications"],"operationId":"GET--api-push-vapid-key","summary":"Web Push VAPID key","description":"Public key for `PushManager.subscribe({applicationServerKey})`.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"public_key":"BIgmiEbXaxZR6tPF…example-vapid-public-key"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/push/subscribe":{"post":{"tags":["Notifications"],"operationId":"POST--api-push-subscribe","summary":"Register a Web Push subscription","description":"Send `PushSubscription.toJSON()`. Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"PushSubscription.toJSON()."}},"required":["subscription"]},"example":{"subscription":{"endpoint":"https://fcm.googleapis.com/fcm/send/abc","keys":{"p256dh":"BNc…","auth":"k1…"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/push/unsubscribe":{"post":{"tags":["Notifications"],"operationId":"POST--api-push-unsubscribe","summary":"Remove a Web Push subscription","description":"","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"PushSubscription.toJSON()."}},"required":["subscription"]},"example":{"subscription":{"endpoint":"https://fcm.googleapis.com/fcm/send/abc"}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/push/fcm-token":{"post":{"tags":["Notifications"],"operationId":"POST--api-push-fcm-token","summary":"Register an FCM token","description":"Native apps (Android/desktop). Rate limit: 20/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Token. Rules: max 512 chars."},"platform":{"type":"string","description":"Client platform. Rules: max 20 chars."}},"required":["token"]},"example":{"token":"fcm-device-token","platform":"android"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Notifications"],"operationId":"DELETE--api-push-fcm-token","summary":"Remove an FCM token","description":"","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Token. Rules: max 512 chars."}},"required":["token"]},"example":{"token":"fcm-device-token"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/push/test":{"post":{"tags":["Notifications"],"operationId":"POST--api-push-test","summary":"Send a test push","description":"Sends a test notification to all your devices. Rate limit: 5/10 min.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/broadcasting/client-config":{"get":{"tags":["Clients"],"operationId":"GET--api-broadcasting-client-config","summary":"Realtime connection settings","description":"Reverb (Pusher protocol) key/host/port/scheme. `{enabled:false}` when realtime is off.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"enabled":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/client-updates":{"get":{"tags":["Clients"],"operationId":"GET--api-client-updates","summary":"Check for client updates","description":"Public. `update`: `none`, `soft` or `force` (below `min_supported`). Rate limit: 60/min.","security":[],"parameters":[{"name":"platform","in":"query","required":true,"description":"android, desktop-mac, desktop-win, desktop-linux.","schema":{"type":"string"}},{"name":"current","in":"query","required":false,"description":"Current semver.","schema":{"type":"string"}},{"name":"version_code","in":"query","required":false,"description":"Android versionCode (preferred on Android).","schema":{"type":"integer"}},{"name":"channel","in":"query","required":false,"description":"Release channel, default stable.","schema":{"type":"string"}}],"responses":{"200":{"description":"desktop","content":{"application/json":{"example":{"platform":"desktop-mac","channel":"stable","latest":null,"min_supported":null,"update":"none","store_url":null}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/client-updates/desktop/{channel}/{file}":{"get":{"tags":["Clients"],"operationId":"GET--client-updates-desktop-channel-file","summary":"Desktop auto-update feed","description":"electron-updater generic feed: `latest-mac.yml`, `latest.yml` (Windows), `latest-linux.yml`.","security":[],"parameters":[{"name":"file","in":"path","required":true,"description":"latest-mac.yml, latest.yml or latest-linux.yml.","schema":{"type":"string"}},{"name":"channel","in":"path","required":true,"description":"Release channel (stable).","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/client-updates/download/{release}":{"get":{"tags":["Clients"],"operationId":"GET--client-updates-download-release","summary":"Download a client build","description":"Binary referenced by `latest.url`.","security":[],"parameters":[{"name":"release","in":"path","required":true,"description":"Release id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-sets":{"get":{"tags":["Emoji"],"operationId":"GET--api-emoji-sets","summary":"Installed emoji sets","description":"Installed sets plus the system set `min`.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"id":1,"title":"Min","slug":"min","is_system":true,"is_active":true,"author":null,"emoji_count":8,"emojis":[{"emoji_id":1,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"thumbsup","kind":"unicode","unicode":"👍","image_url":null,"count":0},{"emoji_id":2,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"heart","kind":"unicode","unicode":"❤️","image_url":null,"count":0}],"installed":true}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Emoji"],"operationId":"POST--api-emoji-sets","summary":"Create an emoji set","description":"Up to 10 sets per author, 50 emoji per set. Rate limit: 30/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Title. Rules: max 64 chars."},"slug":{"type":"string","description":"URL slug for /e/{slug}. Rules: max 32 chars."}},"required":["title"]},"example":{"title":"Team stickers","slug":"team_stickers"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"example":{"id":2,"title":"Team stickers","slug":"team-stickers","is_system":false,"is_active":true,"author":{"id":1,"name":"Anna Smith","avatar":null},"emoji_count":0,"emojis":[],"installed":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-sets/{idOrSlug}":{"get":{"tags":["Emoji"],"operationId":"GET--api-emoji-sets-idorslug","summary":"Get an emoji set","description":"404 when inactive (e.g. still empty).","security":[{"bearerAuth":[]}],"parameters":[{"name":"idOrSlug","in":"path","required":true,"description":"Set id or slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Emoji"],"operationId":"PATCH--api-emoji-sets-emojiset","summary":"Rename a set","description":"Owner only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"idOrSlug","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Title. Rules: max 64 chars."}},"required":["title"]},"example":{"title":"Team stickers v2"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"id":2,"title":"Team stickers v2","slug":"team-stickers","is_system":false,"is_active":true,"author":{"id":1,"name":"Anna Smith","avatar":null},"emoji_count":1,"emojis":[{"emoji_id":9,"set_id":2,"set_title":"Team stickers v2","set_active":true,"shortcode":"ship_it","kind":"custom","unicode":null,"image_url":"https://minchatapp.com/storage/emojis/cc/ccfcc4cd72fa42b444b4c2c4837bb847ae6897be6fc4ad9a59eb63cce11df4f8.png","count":0}],"installed":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Emoji"],"operationId":"DELETE--api-emoji-sets-emojiset","summary":"Delete a set","description":"Owner or admin.","security":[{"bearerAuth":[]}],"parameters":[{"name":"idOrSlug","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-sets/{emojiSet}/emojis":{"post":{"tags":["Emoji"],"operationId":"POST--api-emoji-sets-emojiset-emojis","summary":"Add an emoji","description":"Multipart: `shortcode` + `image` (≤ 256 KB, ≤ 128×128, jpeg/png/webp/gif). Rate limit: 30/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"emojiSet","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"shortcode":{"type":"string","description":"Emoji shortcode. Rules: pattern ^[a-z0-9_-]{2,32}$."},"image":{"type":"string","format":"binary","description":"Image file (multipart). Rules: max 256 KB."}},"required":["shortcode","image"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"emoji_id":9,"set_id":2,"set_title":"Team stickers","set_active":true,"shortcode":"ship_it","kind":"custom","unicode":null,"image_url":"https://minchatapp.com/storage/emojis/cc/ccfcc4cd72fa42b444b4c2c4837bb847ae6897be6fc4ad9a59eb63cce11df4f8.png","count":0}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-sets/{emojiSet}/emojis/{emoji}":{"delete":{"tags":["Emoji"],"operationId":"DELETE--api-emoji-sets-emojiset-emojis-emoji","summary":"Delete an emoji","description":"","security":[{"bearerAuth":[]}],"parameters":[{"name":"emoji","in":"path","required":true,"description":"Emoji id.","schema":{"type":"string"}},{"name":"emojiSet","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-sets/{emojiSet}/install":{"post":{"tags":["Emoji"],"operationId":"POST--api-emoji-sets-emojiset-install","summary":"Install a set","description":"Up to 30 installed sets of other authors.","security":[{"bearerAuth":[]}],"parameters":[{"name":"emojiSet","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"installed":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Emoji"],"operationId":"DELETE--api-emoji-sets-emojiset-install","summary":"Uninstall a set","description":"Own and system sets → 403.","security":[{"bearerAuth":[]}],"parameters":[{"name":"emojiSet","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-sets/{emojiSet}/report":{"post":{"tags":["Emoji"],"operationId":"POST--api-emoji-sets-emojiset-report","summary":"Report a set","description":"Rate limit: 10/60 min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"emojiSet","in":"path","required":true,"description":"Emoji set id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"End reason. Rules: one of: spam, abuse, other."},"note":{"type":"string","description":"Private note. Rules: max 500 chars."}},"required":["reason"]},"example":{"reason":"spam","note":"Ads"}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emoji-set-reports":{"get":{"tags":["Emoji"],"operationId":"GET--api-emoji-set-reports","summary":"Emoji set reports (admins)","description":"Only for accounts with `is_admin`.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/emojis/recent":{"get":{"tags":["Emoji"],"operationId":"GET--api-emojis-recent","summary":"Recently used emoji","description":"Up to 8.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":[{"emoji_id":1,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"thumbsup","kind":"unicode","unicode":"👍","image_url":null,"count":0},{"emoji_id":4,"set_id":1,"set_title":"Min","set_active":true,"shortcode":"fire","kind":"unicode","unicode":"🔥","image_url":null,"count":0}]}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bots":{"get":{"tags":["Bots (management)"],"operationId":"GET--api-bots","summary":"List my bots","description":"","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"bots":[{"id":5,"name":"Weather Bot","username":"weather_bot","avatar":null,"created_at":"2026-10-22T09:06:14+00:00"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Bots (management)"],"operationId":"POST--api-bots","summary":"Create a bot","description":"`username` must end with `bot`. Up to 20 bots per owner. The token is returned once; a private chat owner ↔ bot is created. Rate limit: 10/min.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name. Rules: max 64 chars."},"username":{"type":"string","description":"Bot username (…bot). Rules: max 32 chars."}},"required":["name","username"]},"example":{"name":"Weather Bot","username":"weather_bot"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"example":{"success":true,"bot":{"id":5,"name":"Weather Bot","username":"weather_bot","avatar":null},"token":"5:AAEhBP0av28Jc9RIwmZ8P-exampleToken"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bots/{bot}/token":{"post":{"tags":["Bots (management)"],"operationId":"POST--api-bots-bot-token","summary":"Regenerate the bot token","description":"The old token stops working immediately. Rate limit: 10/min.","security":[{"bearerAuth":[]}],"parameters":[{"name":"bot","in":"path","required":true,"description":"Bot user id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"success":true,"token":"5:AAEhBP0av28Jc9RIwmZ8P-exampleToken"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/bots/{bot}":{"delete":{"tags":["Bots (management)"],"operationId":"DELETE--api-bots-bot","summary":"Delete a bot","description":"Revokes the token and deletes the bot account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"bot","in":"path","required":true,"description":"Bot user id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bot{token}/getMe":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_getMe","summary":"getMe — Get the bot user","description":"Returns the bot as a User object. Returns: User. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: User","content":{"application/json":{"example":{"ok":true,"result":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}}}},"/bot{token}/sendMessage":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_sendMessage","summary":"sendMessage — Send a text message","description":"Text up to 4096 characters. Entities / parse_mode are not supported (sent as plain text; clients render the MinChat markup such as bold). Links in the text get a preview card unless disable_web_page_preview or link_preview_options.is_disabled is true. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true,"result":{"message_id":50,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false},"text":"Pick a city:","reply_markup":{"inline_keyboard":[[{"text":"Moscow","callback_data":"city:moscow"},{"text":"Berlin","callback_data":"city:berlin"}],[{"text":"Open website","url":"https://minchatapp.com"}]]}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"text":{"type":"string","description":"String. Message text, 1–4096 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"disable_web_page_preview":{"type":"boolean","description":"Boolean. true disables the link preview for links in the text (Telegram's legacy parameter)."},"link_preview_options":{"type":"object","description":"LinkPreviewOptions. Object or JSON string, e.g. {\"is_disabled\": true}. Only is_disabled is supported; other fields are ignored."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","text"]}}}}}},"/bot{token}/sendPhoto":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_sendPhoto","summary":"sendPhoto — Send a photo","description":"photo is a multipart upload, an HTTPS/HTTP URL the server downloads (≤ 50 MB), or a file_id received earlier by this bot. MIME must be image/*. No link preview is generated for links in the caption (as in Telegram); disable_web_page_preview / link_preview_options are accepted for compatibility. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true,"result":{"message_id":52,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false},"caption":"Forecast map","photo":[{"file_id":"dc16f474-b747-4b41-9ba4-f61593ff883e","file_unique_id":"3802d3007f292b24","width":64,"height":40,"file_size":146}]}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"photo":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"disable_web_page_preview":{"type":"boolean","description":"Boolean. true disables the link preview for links in the text (Telegram's legacy parameter)."},"link_preview_options":{"type":"object","description":"LinkPreviewOptions. Object or JSON string, e.g. {\"is_disabled\": true}. Only is_disabled is supported; other fields are ignored."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","photo"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"photo":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"disable_web_page_preview":{"type":"boolean","description":"Boolean. true disables the link preview for links in the text (Telegram's legacy parameter)."},"link_preview_options":{"type":"object","description":"LinkPreviewOptions. Object or JSON string, e.g. {\"is_disabled\": true}. Only is_disabled is supported; other fields are ignored."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","photo"]}}}}}},"/bot{token}/sendDocument":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_sendDocument","summary":"sendDocument — Send a file","description":"document is a multipart upload, an HTTPS/HTTP URL the server downloads (≤ 50 MB), or a file_id received earlier by this bot. MIME must be any type. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true,"result":{"message_id":53,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false},"caption":"Same file, re-sent by file_id","document":{"file_id":"009953e4-f1d2-466f-aea9-b94328ecec7a","file_unique_id":"3802d3007f292b24","file_name":"map.png","mime_type":"image/png","file_size":146}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"document":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","document"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"document":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","document"]}}}}}},"/bot{token}/sendVideo":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_sendVideo","summary":"sendVideo — Send a video","description":"video is a multipart upload, an HTTPS/HTTP URL the server downloads (≤ 50 MB), or a file_id received earlier by this bot. MIME must be video/*. No link preview is generated for links in the caption (as in Telegram); disable_web_page_preview / link_preview_options are accepted for compatibility. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"video":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"disable_web_page_preview":{"type":"boolean","description":"Boolean. true disables the link preview for links in the text (Telegram's legacy parameter)."},"link_preview_options":{"type":"object","description":"LinkPreviewOptions. Object or JSON string, e.g. {\"is_disabled\": true}. Only is_disabled is supported; other fields are ignored."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","video"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"video":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"disable_web_page_preview":{"type":"boolean","description":"Boolean. true disables the link preview for links in the text (Telegram's legacy parameter)."},"link_preview_options":{"type":"object","description":"LinkPreviewOptions. Object or JSON string, e.g. {\"is_disabled\": true}. Only is_disabled is supported; other fields are ignored."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","video"]}}}}}},"/bot{token}/sendAudio":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_sendAudio","summary":"sendAudio — Send audio","description":"audio is a multipart upload, an HTTPS/HTTP URL the server downloads (≤ 50 MB), or a file_id received earlier by this bot. MIME must be audio/* or application/ogg. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"audio":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","audio"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"audio":{"type":"string","description":"file upload (multipart), URL or file_id InputFile | String. File, URL or file_id."},"caption":{"type":"string","description":"String. Caption, 0–1024 chars."},"reply_to_message_id":{"type":"integer","description":"Integer. Reply to a message of the same chat."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["chat_id","audio"]}}}}}},"/bot{token}/getFile":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_getFile","summary":"getFile — Get file info","description":"Returns file_path for files sent by this bot (file_id is bot-scoped). Download with GET /file/bot<token>/<file_path>. Returns: File. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: File","content":{"application/json":{"example":{"ok":true,"result":{"file_id":"dc16f474-b747-4b41-9ba4-f61593ff883e","file_unique_id":"3802d3007f292b245acabbcc606f7e00","file_size":146,"file_path":"media/cc/fc/ccfcc4cd72fa42b444b4c2c4837bb847ae6897be6fc4ad9a59eb63cce11df4f8.png"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"String. File id."}},"required":["file_id"]}}}}}},"/bot{token}/editMessageText":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_editMessageText","summary":"editMessageText — Edit message text","description":"Only messages sent by this bot. Passing reply_markup replaces the keyboard; an empty string removes it. A changed text regenerates the link preview; disable_web_page_preview / link_preview_options.is_disabled removes it. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true,"result":{"message_id":50,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false},"text":"Moscow: +5°C, cloudy ☁️","reply_markup":{"inline_keyboard":[[{"text":"Refresh","callback_data":"refresh:moscow"}]]}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Accepted for compatibility; the message is located by message_id."},"message_id":{"type":"integer","description":"Integer. Message id."},"text":{"type":"string","description":"String. New text, 1–4096 chars."},"disable_web_page_preview":{"type":"boolean","description":"Boolean. true disables the link preview for links in the text (Telegram's legacy parameter)."},"link_preview_options":{"type":"object","description":"LinkPreviewOptions. Object or JSON string, e.g. {\"is_disabled\": true}. Only is_disabled is supported; other fields are ignored."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["message_id","text"]}}}}}},"/bot{token}/editMessageReplyMarkup":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_editMessageReplyMarkup","summary":"editMessageReplyMarkup — Edit the inline keyboard","description":"{\"inline_keyboard\":[]} or no reply_markup removes the keyboard. Returns: Message. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Message","content":{"application/json":{"example":{"ok":true,"result":{"message_id":50,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false},"text":"Moscow: +5°C, cloudy ☁️"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Accepted for compatibility."},"message_id":{"type":"integer","description":"Integer. Message id."},"reply_markup":{"type":"object","description":"InlineKeyboardMarkup. Inline keyboard (object or JSON string). Only InlineKeyboardMarkup is supported."}},"required":["message_id"]}}}}}},"/bot{token}/deleteMessage":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_deleteMessage","summary":"deleteMessage — Delete a message","description":"Deletes a message sent by this bot for everyone. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Accepted for compatibility."},"message_id":{"type":"integer","description":"Integer. Message id."}},"required":["message_id"]}}}}}},"/bot{token}/pinChatMessage":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_pinChatMessage","summary":"pinChatMessage — Pin a message","description":"Adds a message to the chat's pinned messages (up to 5 per chat). Pinning an already pinned message returns true. In groups, members see a \"pinned a message\" service message unless disable_notification is set. The bot must be the owner or an administrator of the group/channel (in a private chat with a user it may always pin). Errors: 403 Forbidden: not enough rights to manage pinned messages in the chat, 400 Bad Request: message not found (unknown, deleted or another chat's message). 400 Bad Request: too many pinned messages (limit 5) when the limit is reached. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Chat id: user id for a private chat, -<conversation id> for a group or channel."},"message_id":{"type":"integer","description":"Integer. Id of the message to pin."},"disable_notification":{"type":"boolean","description":"Boolean. Pass true to pin silently (no service message in groups)."}},"required":["chat_id","message_id"]}}}}}},"/bot{token}/unpinChatMessage":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_unpinChatMessage","summary":"unpinChatMessage — Unpin a message","description":"Removes a message from the chat's pinned messages. Without message_id, the most recently pinned message is unpinned; if nothing is pinned, returns true. The bot must be the owner or an administrator of the group/channel (in a private chat with a user it may always pin). Errors: 403 Forbidden: not enough rights to manage pinned messages in the chat, 400 Bad Request: message not found (unknown, deleted or another chat's message). Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Chat id: user id for a private chat, -<conversation id> for a group or channel."},"message_id":{"type":"integer","description":"Integer. Id of the message to unpin. Omit to unpin the most recent one."}},"required":["chat_id"]}}}}}},"/bot{token}/unpinAllChatMessages":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_unpinAllChatMessages","summary":"unpinAllChatMessages — Unpin all messages","description":"Clears the list of pinned messages in a chat. The bot must be the owner or an administrator of the group/channel (in a private chat with a user it may always unpin). Error: 403 Forbidden: not enough rights to manage pinned messages in the chat. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Chat id: user id for a private chat, -<conversation id> for a group or channel."}},"required":["chat_id"]}}}}}},"/bot{token}/answerCallbackQuery":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_answerCallbackQuery","summary":"answerCallbackQuery — Answer a button press","description":"Stores the answer for the callback query (first answer wins). text ≤ 200 chars. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callback_query_id":{"type":"string","description":"String. callback_query.id from the update."},"text":{"type":"string","description":"String. Notification text."},"show_alert":{"type":"boolean","description":"Boolean. Show as an alert instead of a toast."}},"required":["callback_query_id"]}}}}}},"/bot{token}/getUpdates":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_getUpdates","summary":"getUpdates — Long-poll for updates","description":"Returns pending updates in order. Pass offset = last update_id + 1 to confirm (older updates are deleted). Fails with 409 while a webhook is set. Returns: Array of Update. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Array of Update","content":{"application/json":{"example":{"ok":true,"result":[{"update_id":1,"message":{"message_id":51,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":1,"is_bot":false,"first_name":"Anna","last_name":"Smith","username":"anna_s"},"text":"/weather Moscow"}},{"update_id":3,"callback_query":{"id":"1","from":{"id":1,"is_bot":false,"first_name":"Anna","last_name":"Smith","username":"anna_s"},"chat_instance":"8","data":"city:moscow","message":{"message_id":50,"date":1792660008,"chat":{"id":1,"type":"private","first_name":"Anna","username":"anna_s"},"from":{"id":5,"is_bot":true,"first_name":"Weather","last_name":"Bot","username":"weather_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false},"text":"Pick a city:","reply_markup":{"inline_keyboard":[[{"text":"Moscow","callback_data":"city:moscow"},{"text":"Berlin","callback_data":"city:berlin"}],[{"text":"Open website","url":"https://minchatapp.com"}]]}}}}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"offset":{"type":"integer","description":"Integer. First update id to return; confirms all earlier ones."},"limit":{"type":"integer","description":"Integer. 1–100, default 100."},"timeout":{"type":"integer","description":"Integer. Long-poll seconds, 0–50 (default 0 = short poll)."}}}}}}}},"/bot{token}/setWebhook":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_setWebhook","summary":"setWebhook — Set a webhook","description":"HTTPS only. Each update is POSTed as JSON; a 2xx response marks it delivered, otherwise it is retried (3 attempts, 30 s apart). With secret_token the header X-Telegram-Bot-Api-Secret-Token is sent. Pending updates are delivered right away. An empty url removes the webhook. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"String. HTTPS URL."},"secret_token":{"type":"string","description":"String. Sent back in X-Telegram-Bot-Api-Secret-Token."},"max_connections":{"type":"integer","description":"Integer. Stored and reported (default 40)."},"allowed_updates":{"type":"array","items":{"type":"object"},"description":"Array of String. Stored and reported; filtering is not applied yet."}},"required":["url"]}}}}}},"/bot{token}/deleteWebhook":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_deleteWebhook","summary":"deleteWebhook — Remove the webhook","description":"Switch back to getUpdates. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}}}},"/bot{token}/getWebhookInfo":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_getWebhookInfo","summary":"getWebhookInfo — Webhook status","description":"url is empty when no webhook is set. Includes pending_update_count, last error. Returns: WebhookInfo. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: WebhookInfo","content":{"application/json":{"example":{"ok":true,"result":{"url":"https://example.com/minchat-webhook","has_custom_certificate":false,"pending_update_count":0,"max_connections":40}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}}}},"/bot{token}/setMyCommands":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_setMyCommands","summary":"setMyCommands — Set the command list","description":"Replaces commands for the given scope.type (default default) and language_code. command ≤ 32, description ≤ 256 chars. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commands":{"type":"array","items":{"type":"object"},"description":"Array of BotCommand. [{\"command\":\"start\",\"description\":\"…\"}] (object or JSON string)."},"scope":{"type":"object","description":"BotCommandScope. Only type is stored."},"language_code":{"type":"string","description":"String. Language code, empty = all."}},"required":["commands"]}}}}}},"/bot{token}/getMyCommands":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_getMyCommands","summary":"getMyCommands — Get the command list","description":" Returns: Array of BotCommand. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: Array of BotCommand","content":{"application/json":{"example":{"ok":true,"result":[{"command":"start","description":"Start the bot"},{"command":"weather","description":"Current weather"}]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"object","description":"BotCommandScope. Scope (type)."},"language_code":{"type":"string","description":"String. Language code."}}}}}}}},"/bot{token}/sendChatAction":{"post":{"tags":["Bot API"],"security":[],"operationId":"bot_sendChatAction","summary":"sendChatAction — Chat action (no-op)","description":"Accepted for compatibility and returns true; nothing is shown to users yet. Returns: True. Also available via GET.","parameters":[{"name":"token","in":"path","required":true,"description":"Bot token `<bot_id>:<secret>` (the path is /bot<token>/<method>).","schema":{"type":"string"}}],"responses":{"200":{"description":"ok: true, result: True","content":{"application/json":{"example":{"ok":true,"result":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"integer","description":"Integer. Target chat: a user id (> 0) for a private chat, or -conversation_id (< 0) for a group/channel the bot is a member of. @username is not supported."},"action":{"type":"string","description":"String. e.g. typing."}},"required":["chat_id","action"]}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Laravel Sanctum personal access token"}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","example":false},"code":{"type":"string","example":"common.not_found"},"error":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"error_codes":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"BotError":{"type":"object","properties":{"ok":{"type":"boolean","example":false},"error_code":{"type":"integer","example":400},"description":{"type":"string"}}}}}}