Mosaiko Bot API v1
API REST completa para automação, moderação e integração de bots nas comunidades do Mosaiko.
1. Autenticação & Headers
Todas as requisições devem incluir o token do bot através do cabeçalho Authorization ou X-Bot-Token.
Authorization: Bearer mk_bot_e1a2b3c4d5e6f7... Content-Type: application/json2. Dados da Comunidade
GET/api/v1/bot/community
Retorna as configurações e limites vigentes da comunidade vinculada ao bot.
curl -H "Authorization: Bearer SEU_TOKEN" https://mosaiko.party/api/v1/bot/community3. Buscar Tópicos
GET/api/v1/bot/topics?limit=20&page=1&q=termo&author=usuario&status=approved
Suporta filtros de paginação, busca por palavra-chave e status (approved, pending, all).
curl -H "Authorization: Bearer SEU_TOKEN" "https://mosaiko.party/api/v1/bot/topics?limit=10&page=1"4. Criar Tópico como Bot
POST/api/v1/bot/topics
curl -X POST \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -d '{"title": "Anúncio do Bot", "content": "Corpo da postagem em **Markdown**.", "is_sticky": false, "is_locked": false, "is_nsfw": false}' \ https://mosaiko.party/api/v1/bot/topics5. Fixar, Trancar & Aprovar Tópico
POST/api/v1/bot/topics/{topic_id}/pin — Body: {"is_sticky": true}
POST/api/v1/bot/topics/{topic_id}/lock — Body: {"is_locked": true}
POST/api/v1/bot/topics/{topic_id}/approve — Body: {"action": "approve" | "reject"}
curl -X POST -H "Authorization: Bearer SEU_TOKEN" -H "Content-Type: application/json" -d '{"is_locked": true}' https://mosaiko.party/api/v1/bot/topics/a1b2c3d/lock6. Buscar Respostas
GET/api/v1/bot/replies?topic_id={topic_id}
curl -H "Authorization: Bearer SEU_TOKEN" "https://mosaiko.party/api/v1/bot/replies?topic_id=a1b2c3d"7. Responder a Tópico
POST/api/v1/bot/topics/{topic_id}/reply
curl -X POST \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -d '{"content": "Olá! Esta é uma resposta automática do bot.", "parent_id": null}' \ https://mosaiko.party/api/v1/bot/topics/a1b2c3d/reply8. Buscar Membros da Comunidade
GET/api/v1/bot/members
curl -H "Authorization: Bearer SEU_TOKEN" https://mosaiko.party/api/v1/bot/members9. Apagar Posts
DELETE/api/v1/bot/topics/{topic_id}
DELETE/api/v1/bot/replies/{topic_id}/{reply_id}
curl -X DELETE -H "Authorization: Bearer SEU_TOKEN" https://mosaiko.party/api/v1/bot/topics/a1b2c3d10. Punições & Desbanimento
POST/api/v1/bot/punish — Body: {"username": "alvo", "type": "warn" | "mute" | "ban", "reason": "motivo"}
POST/api/v1/bot/unban — Body: {"username": "alvo"}
curl -X POST \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -d '{"username": "usuario_infrator", "type": "ban", "reason": "Spam proibido"}' \ https://mosaiko.party/api/v1/bot/punish