MAN System - API Documentation

API Docs 35+ Endpoints Interactive
API Overview
35+
API Endpoints
REST
API Standard
JSON
Data Format
Base URL: https://servermap.one/api
Authentication: Session-based (no API key required)
Content-Type: application/json for POST requests
System & Health
GET /api/health
System health status

Get system health and status information

Request:
GET /api/health
Response:
{ "accounts": 10, "features": ["Account verification", "Persistent sessions", "Group joining/leaving", "Real Telegram integration"], "service": "Go Telegram API with gotd/td", "status": "healthy", "timestamp": "2025-09-16T08:42:12Z" }
Account Management
GET /api/accounts
List all Telegram accounts

Get all registered Telegram accounts

Request:
GET /api/accounts
Response:
[ { "id": "tg_1757501625_20368581", "name": "@CtradioLin", "phone": "40760037813", "api_id": "20368581", "status": "verified", "telegram_username": "CtradioLin", "telegram_first_name": "tgalpha", "created_at": "2025-09-10 10:53:45" } ]
POST /api/accounts
Add new Telegram account

Register a new Telegram account

Request:
POST /api/accounts Content-Type: application/json { "name": "MyAccount", "phone": "+1234567890", "api_id": "12345678", "api_hash": "abcdef1234567890abcdef1234567890" }
Response:
{ "status": "saved", "id": "tg_1234567890_12345678", "message": "Account saved successfully" }
POST /api/accounts/{id}/verify
Verify account with SMS code

Verify account using SMS verification code

Request:
POST /api/accounts/{account_id}/verify Content-Type: application/json { "code": "12345" }
Response:
{ "status": "success", "message": "Account verified successfully" }
POST /api/accounts/{id}/send-code
Send verification code to phone

Send SMS verification code to account phone number

Request:
POST /api/accounts/{account_id}/send-code
Response:
{ "status": "success", "message": "Verification code sent" }
Group Operations
GET /api/groups/all
Get all joined groups

Get all groups joined by all accounts

Request:
GET /api/groups/all
Response:
[ { "id": "group_1757503907", "title": "Mothership Explorers", "username": "mothershipcrew", "member_count": 37, "type": "channel", "account_id": "tg_1757501625_20368581", "joined_at": "2025-09-10 11:31:47" } ]
POST /api/groups/join
Join a Telegram group/channel

Join a group or channel using an account

Request:
POST /api/groups/join Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_url": "https://t.me/cryptotrading" }
Response:
{ "success": true, "group": { "id": "group_1757503907", "title": "Crypto Trading", "member_count": 1250 } }
POST /api/groups/post
Post message to group

Send a message to a group using an account

Request:
POST /api/groups/post Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_id": "group_1757503907", "message": "Hello everyone! 👋" }
Response:
{ "success": true, "group_username": "cryptotrading", "telegram_message_id": 12345, "posted_message": "Hello everyone! 👋" }
POST /api/groups/multi-account-post
🚀 NEW: Multi-account group messaging

🚀 Advanced: Post messages using multiple accounts with human-like timing

Request:
POST /api/groups/multi-account-post Content-Type: application/json { "account_ids": [ "tg_1757501625_20368581", "tg_1757501609_13828895", "tg_1757501589_11560509" ], "group_id": "group_1757503907", "messages": [ "Hello everyone! 👋", "How's everyone doing today?", "Great to see this community growing!" ], "delay_config": { "min_delay": 5, "max_delay": 20, "random_order": true, "random_accounts": true } }
Response:
{ "status": "started", "total_messages": 3, "estimated_duration": "2-5 minutes", "queue_id": "queue_1726488123" }
Human-like Features:
  • Perfect 1:1 distribution (3 accounts + 3 messages = 1 each)
  • Fair distribution (5 accounts + 7 messages = 2,2,1,1,1)
  • Random delays with natural variation
  • Randomized message and account order
  • Occasional extra pauses (10% chance)
POST /api/groups/leave
Leave a group/channel

Leave a group or channel using an account

Request:
POST /api/groups/leave Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_id": "group_1757503907" }
Response:
{ "success": true, "message": "Left group successfully" }
POST /api/groups/sync-all
Sync all groups from Telegram

Synchronize all groups from a Telegram account

Request:
POST /api/groups/sync-all Content-Type: application/json { "account_id": "tg_1757501625_20368581" }
Response:
{ "success": true, "total_groups": 15, "message": "Groups synced successfully" }
User Operations
GET /api/users/all
Get all collected users

Get all users collected from groups

Request:
GET /api/users/all
Response:
[ { "user_id": 123456789, "username": "cryptotrader", "first_name": "John", "last_name": "Doe", "is_verified": true, "total_groups": 5 } ]
POST /api/users/collect
Collect users from a group

Collect user data from a specific group

Request:
POST /api/users/collect Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_id": "group_1757503907", "limit": 100 }
Response:
{ "success": true, "users_collected": 85, "group_title": "Crypto Trading" }
POST /api/users/send-message
Send individual direct message

Send a direct message to a specific user

Request:
POST /api/users/send-message Content-Type: application/json { "account_id": "tg_1757501625_20368581", "user_id": "123456789", "message": "Hello! How are you?" }
Response:
{ "success": true, "message_id": 12345, "user": { "user_id": 123456789, "username": "cryptotrader" } }
POST /api/users/bulk-message
Send messages to multiple users

Send direct messages to multiple users

Request:
POST /api/users/bulk-message Content-Type: application/json { "account_id": "tg_1757501625_20368581", "messages": [ {"username": "cryptotrader", "message": "Hello!"}, {"username": "blockchain_dev", "message": "Hi there!"} ], "delay_seconds": 5 }
Response:
{ "success": true, "total_messages": 2, "successful": 2, "failed": 0 }
POST /api/users/enhance-bios
Enhance user bio data

Enhance bio data for collected users

Request:
POST /api/users/enhance-bios Content-Type: application/json { "account_id": "tg_1757501625_20368581", "user_ids": [123456789, 987654321] }
Response:
{ "success": true, "bios_updated": 15, "total_users": 20 }
GET /api/users/{user_id}
Get detailed user information

Get detailed information about a specific user

Request:
GET /api/users/123456789
Response:
{ "user_id": 123456789, "username": "cryptotrader", "first_name": "John", "last_name": "Doe", "bio": "Crypto trader and blockchain enthusiast", "total_groups": 5, "groups": [ {"title": "Crypto Trading", "is_admin": false}, {"title": "Blockchain News", "is_admin": true} ] }
Advanced Group Operations
POST /api/groups/manual-count
Manually update group member count

Manually refresh member count for a group

Request:
POST /api/groups/manual-count Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_id": "group_1757503907" }
Response:
{ "success": true, "group_id": "group_1757503907", "member_count": 1250, "updated_at": "2025-09-16T08:42:12Z" }
POST /api/groups/advanced-collection
Advanced group data collection

Perform advanced data collection on a group

Request:
POST /api/groups/advanced-collection Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_id": "group_1757503907", "collect_members": true, "collect_admins": true, "collect_recent_messages": true }
Response:
{ "success": true, "members_collected": 150, "admins_found": 5, "messages_collected": 100 }
GET /api/groups/members/{group_id}
Get group members

Get all members of a specific group

Request:
GET /api/groups/members/group_1757503907
Response:
[ { "user_id": 123456789, "username": "cryptotrader", "first_name": "John", "is_admin": false, "joined_date": "2025-09-10T10:30:00Z" } ]
POST /api/groups/refresh-data
Refresh all group data

Refresh data for all groups

Request:
POST /api/groups/refresh-data
Response:
{ "success": true, "groups_refreshed": 25, "total_members_updated": 15000 }
POST /api/bulk-join-groups
Bulk join multiple groups

Join multiple groups at once with one account

Request:
POST /api/bulk-join-groups Content-Type: application/json { "account_id": "tg_1757501625_20368581", "group_urls": [ "https://t.me/cryptotrading", "https://t.me/blockchain", "@defi_news" ] }
Response:
{ "results": [ {"group_url": "https://t.me/cryptotrading", "success": true, "group": {"title": "Crypto Trading"}}, {"group_url": "https://t.me/blockchain", "success": false, "error": "Group not found"} ], "successful_joins": 1, "failed_joins": 1 }
Analytics & Insights
GET /api/analytics/shared-groups
Find shared groups between users

Analyze shared group memberships

Request:
GET /api/analytics/shared-groups?user_id=123456789
Response:
{ "user_id": 123456789, "shared_groups": [ { "title": "Crypto Trading", "shared_users_count": 50, "total_members": 1250 } ] }
Admin Operations
POST /api/admin/cleanup-duplicates
Clean up duplicate data

Remove duplicate entries from database

Request:
POST /api/admin/cleanup-duplicates
Response:
{ "success": true, "duplicates_removed": 25, "tables_cleaned": ["users", "groups", "relationships"] }
Extended Public API
GET /api/public/groups
Public group statistics

Get public group statistics (no auth required)

Request:
GET /api/public/groups
Response:
[ { "title": "Crypto Trading", "member_count": 1250, "type": "channel", "activity_score": 85 } ]
GET /api/public/users
Public user statistics

Get public user statistics (no auth required)

Request:
GET /api/public/users
Response:
{ "total_users": 1500, "verified_users": 850, "bot_accounts": 25, "premium_users": 200 }
GET /api/public/network
Public network data

Get public network analysis data

Request:
GET /api/public/network
Response:
{ "total_connections": 5000, "network_density": 0.75, "top_influencers": [ {"username": "crypto_guru", "influence_score": 95} ] }
GET /api/public/search
Public search functionality
Public API (No Authentication)
GET /api/public/stats
Public system statistics

Get public system statistics (no auth required)

Request:
GET /api/public/stats
Response:
{ "total_accounts": 10, "total_groups": 25, "total_users": 1500, "system_uptime": "2 days", "last_updated": "2025-09-16T08:42:12Z" }
API Test Results
Click "Test Endpoint" buttons to see live API responses here...