Integrate WhatsApp, Telegram, Facebook, Instagram, and LinkedIn automation via JSON over HTTPS.
Authenticate requests using your account's secretToken found on your dashboard card. Send JSON bodies with Content-Type: application/json.
Base URL: https://api.supergreen.cc
n8n Cloud: Search Supergreen directly in the node picker (+).
Self-hosted: Settings โ Community Nodes โ Install n8n-nodes-supergreen.
n8n-nodes-supergreen
Copy JSON and press Ctrl+V / Cmd+V on your n8n canvas:
View GitHub Repository โBuild serverless bots and AI agents with Vercel Chat SDK across WhatsApp (personal lines & groups) and Telegram over signed HTTP webhooks โ no Meta app review or persistent WebSocket worker required.
npm install chat-adapter-supergreen chat @chat-adapter/state-memory
Set SUPERGREEN_TOKEN (and optionally SUPERGREEN_PHONE_NUMBER for proactive openDM() / getGroups() calls), or pass async credential resolvers for rotating secrets. Point your Supergreen webhook URL at your deployed route.
import { Chat } from "chat";import { createMemoryState } from "@chat-adapter/state-memory";import { createSupergreenAdapter } from "chat-adapter-supergreen";export const bot = new Chat({userName: "mybot",state: createMemoryState(),adapters: {supergreen: createSupergreenAdapter(),},});bot.onDirectMessage(async (thread, message) => {await thread.startTyping();await thread.post(`You said: ${message.text}`);});bot.onNewMention(async (thread, message) => {await thread.subscribe();await thread.reply(message, "Got it โ I'm listening to this group.");});
import { after } from "next/server";import { bot } from "@/lib/bot";export async function POST(request: Request) {return bot.webhooks.supergreen(request, {waitUntil: (task) => after(() => task),});}
Import ready scenario blueprints into Make.com via the More (...) โ Import Blueprint toolbar menu:
Use Webhooks by Zapier (Catch Hook for inbound triggers, Custom Request POST to https://api.supergreen.cc/ for outbound actions):
{"endpoint": "sendMessage","payload": {"token": "YOUR_SUPERGREEN_TOKEN","fromNumber": "YOUR_PHONE","toNumber": "15551234567@c.us","message": "Hello from Zapier!"}}
const API_BASE = 'https://api.supergreen.cc';const YOUR_TOKEN = 'your-secret-token-here';const YOUR_PHONE = 'your-whatsapp-number';async function sendMessage(toNumber, message) {const response = await fetch(API_BASE, {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({endpoint: 'sendMessage',payload: {fromNumber: YOUR_PHONE,toNumber,message,linkPreview: false,token: YOUR_TOKEN,},}),});return response.json();}sendMessage('15551234567@c.us', 'Hello from Node.js!');
Supergreen sends signed POST requests (header x-supergreen-signature: sha256=<hmac-sha256-hex> signed with your secretToken) on message and status events (message, edit, delete, reaction, vote, participant_joined, participant_left, connected, disconnected, banned):
{"event": "message","network": "whatsapp","phoneNumber": "15551234567","messageId": "3EB0123456789ABCDEF","fromMe": false,"chat": {"id": "972509876543@c.us","username": "John Doe","title": "Optional Group Title"},"author": {"id": "972509876543@c.us","username": "John Doe"},"text": "Hello! This is a message from a user.","time": 1703251200000}
Connection lifecycle webhooks fire after a 30-second reconnect grace period so brief restarts don't trigger false alerts:
{"event": "disconnected","network": "whatsapp","phoneNumber": "15551234567","chat": {"id": "15551234567"},"author": {"id": "15551234567"},"text": "","time": 1703251200000}
Pass-through retention: Supergreen does not maintain a central message archive. Media webhook payloads include temporary 7-day signed fileUri links (auto-deleted after expiry), and getMessages, listThreads, and getThread read only from the active line's isolated 7-day sync buffer โ store webhook events on your own server if you need permanent history.
Busy WhatsApp groups mix multiple topics in one stream. Opt-in group thread resolution assigns each group message a stable threadId using instant quote-chain tracking plus a fast decision model for unquoted replies (skipping standalone greetings).
POST /setGroupThreading (optionally passing groupIds to scope to specific groups) or toggle Group thread resolution under your WhatsApp line's Advanced section in the dashboard. Thread resolution works even when no webhook URL is configured.message and edit events automatically include threadId and thread ({ id, viewerUrl, decision, relatedMsgId?, messages }).threadId or direct thread link, and expand full thread histories. Agents notified via webhooks (or listThreads / getThread) can share thread.viewerUrl (https://supergreen.cc/threads/<phoneNumber>/<threadId>) directly with signed-in admins of that line.POST /listThreads to list recent reconstructed threads, POST /getThread to fetch a single thread by threadId (no chatId required), or POST /getMessages with threadId for cursor pagination.// 1. Enable group thread resolution on a WhatsApp lineawait fetch('https://api.supergreen.cc/setGroupThreading', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({phoneNumber: '15551234567',enabled: true,token: 'YOUR_SECRET_TOKEN',}),});// 2. List recent reconstructed threads (optionally filtered by group or query)const { threads } = await fetch('https://api.supergreen.cc/listThreads', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({fromNumber: '15551234567',limit: 30,token: 'YOUR_SECRET_TOKEN',}),}).then((r) => r.json());// 3. Retrieve a specific thread by threadIdconst { thread } = await fetch('https://api.supergreen.cc/getThread', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({fromNumber: '15551234567',threadId: threads[0].id,count: 100,token: 'YOUR_SECRET_TOKEN',}),}).then((r) => r.json());
https://api.supergreen.cc/sendMessageSend a text message to any WhatsApp number or group.
fromNumberstringrequiredtoNumberstringrequiredmessagestringrequiredlinkPreviewbooleanrequiredquotedMessageIdstringtokenstringrequired{"fromNumber": "15551234567","toNumber": "15559876543@c.us","message": "Hello! This is a test message.","linkPreview": false,"token": "your-secret-token"}
{"messageId": "3EB0123456789ABCDEF"}
https://api.supergreen.cc/sendMediaSend images, videos, or documents with optional caption to any WhatsApp number or group.
fromNumberstringrequiredtoNumberstringrequiredbase64stringurlstringtypestringrequiredmimeTypestringfilenamestringcaptionstringtokenstringrequired{"fromNumber": "15551234567","toNumber": "15559876543@c.us","base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","type": "image","caption": "Check out this image!","token": "your-secret-token"}
{"messageId": "3EB0987654321FEDCBA"}
https://api.supergreen.cc/sendContactSend a contact card (vCard) to any WhatsApp number or group.
fromNumberstringrequiredtoNumberstringrequiredcontactIdstringrequirednamestringrequiredtokenstringrequired{"fromNumber": "15551234567","toNumber": "15559876543@c.us","contactId": "15550001111@c.us","name": "Jane Doe","token": "your-secret-token"}
{"messageId": "3EB0CONTACT56789ABCDEF"}
https://api.supergreen.cc/sendPollSend a poll to a WhatsApp group.
fromNumberstringrequiredtoNumberstringrequirednamestringrequiredchoicesarrayrequiredselectableCountnumbertokenstringrequired{"fromNumber": "15551234567","toNumber": "120363123456789012@g.us","name": "What's your favorite color?","choices": ["Red","Blue","Green"],"token": "your-secret-token"}
{"messageId": "3EB0POLL56789ABCDEF"}
https://api.supergreen.cc/sendInteractiveResponseReply to a WhatsApp interactive button, list, template button, or native flow menu by selecting one of its options.
fromNumberstringrequiredtoNumberstringrequiredquotedMessageIdstringrequiredkindstringrequiredselectedIdstringrequiredselectedDisplayTextstringrequiredselectedDescriptionstringselectedIndexintegernativeFlowNamestringtokenstringrequired{"fromNumber": "15551234567","toNumber": "15559876543@c.us","quotedMessageId": "false_15559876543@c.us_3EB0MENU123456","kind": "buttons","selectedId": "btn_support","selectedDisplayText": "Talk to support","token": "your-secret-token"}
{"messageId": "3EB0RESP56789ABCDEF"}
https://api.supergreen.cc/editMessageEdit a previously sent message.
fromNumberstringrequiredmessageIdstringrequirednewTextstringrequiredtokenstringrequired{"fromNumber": "15551234567","messageId": "3EB0123456789ABCDEF","newText": "Updated message text","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/deleteMessageDelete a previously sent message.
fromNumberstringrequiredchatIdstringrequiredmessageIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","chatId": "15551234567@c.us","messageId": "3EB0123456789ABCDEF","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/sendReactionSend a reaction emoji to a message.
fromNumberstringrequiredmessageIdstringrequiredreactionstringrequiredtokenstringrequired{"fromNumber": "15551234567","messageId": "3EB0123456789ABCDEF","reaction": "๐","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/sendTypingIndicationShow the 'typing...' indicator in a chat to make your bot feel more human.
fromNumberstringrequiredchatIdstringrequireddurationMsnumbertokenstringrequired{"fromNumber": "15551234567","chatId": "15559876543@c.us","durationMs": 3000,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/stopTypingIndicationStop showing the 'typing...' indicator in a chat.
fromNumberstringrequiredchatIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","chatId": "15559876543@c.us","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/getMessagesRetrieve recent messages from a WhatsApp conversation or group via the active line's isolated 7-day sync buffer (Supergreen is pass-through infrastructure with no central message archive; use webhooks for permanent storage).
fromNumberstringrequiredchatIdstringrequiredcountintegeridstringfromMebooleandirectionstringthreadIdstringtokenstringrequired{"fromNumber": "15551234567","chatId": "15559876543@c.us","count": 20,"token": "your-secret-token"}
{"success": true,"messages": [{"id": "false_15559876543@c.us_3EB0123456789ABCDEF","chatId": "15559876543@c.us","authorId": "15559876543@c.us","authorName": "John Doe","text": "Hey, are we still on for today?","time": 1703251200000,"fromMe": false,"type": "chat"}]}
https://api.supergreen.cc/listChatsList recent WhatsApp chats (1:1 and groups) ordered by most recent activity from the active line's isolated 7-day sync buffer.
fromNumberstringrequiredlimitintegerquerystringtokenstringrequired{"fromNumber": "15551234567","limit": 20,"token": "your-secret-token"}
{"success": true,"chats": [{"id": "15559876543@c.us","name": "John Doe","isGroup": false,"lastMessageText": "Hey, are we still on for today?","lastMessageTime": 1703251200000,"lastMessageFromMe": false}]}
https://api.supergreen.cc/listThreadsList reconstructed WhatsApp group conversation threads ordered by most recent message from the active line's isolated 7-day buffer (requires group threading enabled via setGroupThreading).
fromNumberstringrequiredchatIdstringlimitintegermessagesPerThreadintegerquerystringtokenstringrequired{"fromNumber": "15551234567","chatId": "120363123456789012@g.us","limit": 30,"messagesPerThread": 20,"token": "your-secret-token"}
{"success": true,"threads": [{"id": "b1f8c4d2-1234-4a56-8b90-abcdef123456","chatId": "120363123456789012@g.us","chatName": "Product Builders","viewerUrl": "https://supergreen.cc/threads/15551234567/b1f8c4d2-1234-4a56-8b90-abcdef123456","messageCount": 2,"firstMessageAt": 1742000000000,"lastMessageAt": 1742000060000,"messages": [{"id": "false_120363123456789012@g.us_3EB012345678","authorId": "15559876543@c.us","authorName": "Alice","text": "Anyone tested the new release?","time": 1742000000000,"fromMe": false},{"id": "false_120363123456789012@g.us_3EB012345679","authorId": "15551112222@c.us","authorName": "Bob","text": "Yes, running smoothly so far.","time": 1742000060000,"fromMe": false,"quotedMessageId": "false_120363123456789012@g.us_3EB012345678"}]}]}
https://api.supergreen.cc/getThreadRetrieve a single reconstructed WhatsApp group conversation thread and its messages by threadId from the active line's isolated 7-day buffer.
fromNumberstringrequiredthreadIdstringrequiredchatIdstringcountintegertokenstringrequired{"fromNumber": "15551234567","threadId": "b1f8c4d2-1234-4a56-8b90-abcdef123456","count": 50,"token": "your-secret-token"}
{"success": true,"thread": {"id": "b1f8c4d2-1234-4a56-8b90-abcdef123456","chatId": "120363123456789012@g.us","chatName": "Product Builders","viewerUrl": "https://supergreen.cc/threads/15551234567/b1f8c4d2-1234-4a56-8b90-abcdef123456","messageCount": 2,"firstMessageAt": 1742000000000,"lastMessageAt": 1742000060000,"messages": [{"id": "false_120363123456789012@g.us_3EB012345678","authorId": "15559876543@c.us","authorName": "Alice","text": "Anyone tested the new release?","time": 1742000000000,"fromMe": false},{"id": "false_120363123456789012@g.us_3EB012345679","authorId": "15551112222@c.us","authorName": "Bob","text": "Yes, running smoothly so far.","time": 1742000060000,"fromMe": false,"quotedMessageId": "false_120363123456789012@g.us_3EB012345678"}]}}
https://api.supergreen.cc/searchContactsSearch WhatsApp contacts and groups by name or phone number to find their chat ID.
fromNumberstringrequiredquerystringrequiredlimitintegertokenstringrequired{"fromNumber": "15551234567","query": "John","limit": 10,"token": "your-secret-token"}
{"success": true,"contacts": [{"id": "15559876543@c.us","name": "John Doe","pushname": "John","isGroup": false}]}
https://api.supergreen.cc/searchMessagesSearch recent WhatsApp messages containing a text query in the active line's isolated 7-day sync buffer, optionally scoped to one chat.
fromNumberstringrequiredquerystringrequiredchatIdstringlimitintegertokenstringrequired{"fromNumber": "15551234567","query": "dinner","limit": 20,"token": "your-secret-token"}
{"success": true,"messages": [{"id": "false_15559876543@c.us_3EB0123456789ABCDEF","chatId": "15559876543@c.us","authorId": "15559876543@c.us","authorName": "John Doe","text": "Are we still on for dinner tonight?","time": 1703251200000,"fromMe": false,"type": "chat"}]}
https://api.supergreen.cc/getGroupsRetrieve a list of WhatsApp groups with admin status for each group.
fromNumberstringrequireduseCachebooleantokenstringrequired{"fromNumber": "15551234567","token": "your-secret-token"}
{"groups": [{"id": "120363123456789012@g.us","name": "My Cool Group","isAdmin": true},{"id": "120363987654321098@g.us","name": "Another Group","isAdmin": false}]}
https://api.supergreen.cc/addUserToWhatsAppGroupAdd a user to a WhatsApp group where you are an admin.
groupIdstringrequireduserIdstringrequiredfromNumberstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","userId": "15559876543@c.us","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/removeUserFromWhatsAppGroupRemove a user from a WhatsApp group where you are an admin.
groupIdstringrequireduserIdstringrequiredfromNumberstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","userId": "15559876543@c.us","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/getCommonWhatsappGroupsGet a list of WhatsApp groups that both you and another user are members of.
fromNumberstringrequireduserIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","userId": "15559876543@c.us","token": "your-secret-token"}
{"groups": [{"id": "120363123456789012@g.us","name": "Shared Group"}]}
https://api.supergreen.cc/getWhatsappJoinRequestsGet pending join requests for a group where you are an admin.
fromNumberstringrequiredgroupIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","token": "your-secret-token"}
{"requests": [{"requesterId": "15559876543@c.us","addedById": null,"parentGroupId": null,"method": "non_admin_add","timestamp": 1703251200000}]}
https://api.supergreen.cc/approveWhatsappJoinRequestsApprove one or more pending join requests for a group.
fromNumberstringrequiredgroupIdstringrequiredrequesterIdsarray | nulltokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","requesterIds": ["15559876543@c.us"],"token": "your-secret-token"}
{"results": [{"requesterId": "15559876543@c.us","error": null,"message": "Approved successfully"}]}
https://api.supergreen.cc/rejectWhatsappJoinRequestsReject one or more pending join requests for a group.
fromNumberstringrequiredgroupIdstringrequiredrequesterIdsarrayrequiredtokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","requesterIds": ["15559876543@c.us"],"token": "your-secret-token"}
{"results": [{"requesterId": "15559876543@c.us","error": null,"message": "Rejected successfully"}]}
https://api.supergreen.cc/getGroupMembersGet all members of a WhatsApp group, including their admin status. Member IDs may be LID format (e.g., '12345@lid') instead of phone numbers depending on the account's addressing mode. Use the convertLidToNumber endpoint to resolve LIDs to phone numbers.
fromNumberstringrequiredgroupIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","token": "your-secret-token"}
{"members": [{"id": "15559876543@c.us","isAdmin": true,"isSuperAdmin": true},{"id": "15551111111@c.us","isAdmin": false,"isSuperAdmin": false}]}
https://api.supergreen.cc/getWhatsappGroupDetailsGet details about a WhatsApp group using its invite link, including group name, description, size, and participants.
fromNumberstringrequiredgroupLinkstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupLink": "https://chat.whatsapp.com/AbCdEfGhIjK","token": "your-secret-token"}
{"success": true,"id": "120363123456789012@g.us","subject": "My Group","desc": "Group description","size": 42,"participants": [{"id": "15559876543@c.us","isAdmin": true,"isSuperAdmin": false}]}
https://api.supergreen.cc/getGroupInviteLinkGet the invite link for a WhatsApp group.
fromNumberstringrequiredgroupIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupId": "120363123456789012@g.us","token": "your-secret-token"}
{"inviteLink": null}
https://api.supergreen.cc/joinGroupByInviteLinkJoin a WhatsApp group using its invite link.
fromNumberstringrequiredgroupLinkstringrequiredtokenstringrequired{"fromNumber": "15551234567","groupLink": "https://chat.whatsapp.com/AbCdEfGhIjK","token": "your-secret-token"}
{"status": "joined","chatId": "120363123456789012@g.us"}
https://api.supergreen.cc/blockContactBlock a WhatsApp contact.
fromNumberstringrequiredcontactIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","contactId": "15559876543@c.us","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/reportContactReport a contact/sender to WhatsApp as spam.
fromNumberstringrequiredcontactIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","contactId": "15559876543@c.us","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/unblockContactUnblock a previously blocked WhatsApp contact.
fromNumberstringrequiredcontactIdstringrequiredtokenstringrequired{"fromNumber": "15551234567","contactId": "15559876543@c.us","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/convertLidToNumberConvert a WhatsApp LID (Linked ID) to a phone number. Some accounts use LID addressing mode where user IDs appear as '12345@lid' instead of phone numbers. This endpoint resolves them.
fromNumberstringrequiredlidstringrequiredtokenstringrequired{"fromNumber": "15551234567","lid": "119846817792023@lid","token": "your-secret-token"}
{"number": "15559876543@c.us"}
https://api.supergreen.cc/checkWhatsappNumberCheck whether a phone number has an active WhatsApp account.
fromNumberstringrequiredtargetNumberstringrequiredtokenstringrequired{"fromNumber": "15551234567","targetNumber": "15559876543","token": "your-secret-token"}
{"success": true,"exists": true,"jid": "15559876543@c.us","number": "15559876543"}
https://api.supergreen.cc/setWebhookSet or update the webhook URL to receive incoming messages and events.
phoneNumberstringrequiredurlstringnullrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/webhook","token": "your-secret-token"}
{}
https://api.supergreen.cc/addWebhookAdd an additional webhook URL to receive incoming messages and events. Each account can have multiple webhook URLs โ events will be sent to all of them.
phoneNumberstringrequiredurlstringrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/webhook","token": "your-secret-token"}
{}
https://api.supergreen.cc/removeWebhookRemove a webhook URL from the account. If the URL matches the legacy webhook field, that is also cleared.
phoneNumberstringrequiredurlstringrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/webhook","token": "your-secret-token"}
{}
https://api.supergreen.cc/reconnectManually trigger a reconnection of your WhatsApp account. The login method (QR code vs pairing code) is determined by the account's preferCodeLogin setting โ use setLoginMethod to change it before reconnecting.
numberstringrequiredtokenstringrequired{"number": "15551234567","token": "your-secret-token"}
{}
https://api.supergreen.cc/setLoginMethodSet whether the account should use a pairing code or QR code when reconnecting. When preferCodeLogin is true, the next reconnect will generate a pairing code instead of a QR code.
phoneNumberstringrequiredpreferCodeLoginbooleanrequiredtokenstringrequired{"phoneNumber": "15551234567","preferCodeLogin": true,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/setGroupThreadingEnable or disable opt-in WhatsApp group conversation threading across all groups on the line. Quote-chain resolution is instant and free; unquoted group messages use a fast decision model up to the monthly fair-use cap.
phoneNumberstringrequiredenabledbooleanrequiredtokenstringrequired{"phoneNumber": "15551234567","enabled": true,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/clearCredentialsClear all stored credentials for your WhatsApp account. Use this to reset authentication.
phoneNumberstringrequiredtokenstringrequired{"phoneNumber": "15551234567","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/changeWhatsappAccountNameChange the display name of your WhatsApp account.
phoneNumberstringrequirednamestringrequiredtokenstringrequired{"phoneNumber": "15551234567","name": "My Business Bot","token": "your-secret-token"}
{}
https://api.supergreen.cc/changeWhatsappAccountAvatarChange the profile picture of your WhatsApp account.
phoneNumberstringrequiredimageBase64stringrequiredtokenstringrequired{"phoneNumber": "15551234567","imageBase64": "/9j/4AAQSkZJRg...","token": "your-secret-token"}
{}
https://api.supergreen.cc/changeWhatsappAccountBioChange the bio/about text of your WhatsApp account.
phoneNumberstringrequiredbiostringrequiredtokenstringrequired{"phoneNumber": "15551234567","bio": "Powered by Supergreen","token": "your-secret-token"}
{}
https://api.supergreen.cc/changeWhatsappPrivacySettingsChange the privacy settings of your WhatsApp account.
phoneNumberstringrequiredcategorystringrequiredvaluestringrequiredtokenstringrequired{"phoneNumber": "15551234567","category": "about","value": "all","token": "your-secret-token"}
{}
https://api.supergreen.cc/submitTelegramCoderefreshTokenstringrequiredphoneNumberstringrequiredcodestringrequired{"phoneNumber": "15551234567","code": "12345","token": "your-secret-token"}
{"success": true,"needsPassword": false}
https://api.supergreen.cc/submitTelegramPasswordrefreshTokenstringrequiredphoneNumberstringrequiredpasswordstringrequired{"phoneNumber": "15551234567","password": "your-telegram-2fa-password","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/reconnectTelegramReconnect a Telegram account or restart the login flow (QR code or login code).
phoneNumberstringrequiredpreferQrLoginbooleantokenstringrequired{"phoneNumber": "15551234567","preferQrLogin": true,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/setTelegramLoginMethodSet whether a Telegram account uses QR code scan or in-app login code when authenticating.
phoneNumberstringrequiredpreferQrLoginbooleanrequiredtokenstringrequired{"phoneNumber": "15551234567","preferQrLogin": true,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/clearTelegramCredentialsLog out and clear stored Telegram session credentials and local sync buffer for this account.
phoneNumberstringrequiredtokenstringrequired{"phoneNumber": "15551234567","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/sendTelegramMessageSend a text message via Telegram, optionally replying to a message.
phoneNumberstringrequiredchatIdstringrequiredtextstringrequiredquotedMessageIdstringlinkPreviewbooleantokenstringrequired{"phoneNumber": "15551234567","chatId": "@example_channel","text": "Hello from Supergreen Telegram!","quotedMessageId": "42","linkPreview": false,"token": "your-secret-token"}
{"success": true,"messageId": "12345"}
https://api.supergreen.cc/sendTelegramMediaSend images, videos, audio/voice notes, or documents to any Telegram chat or group.
phoneNumberstringrequiredchatIdstringrequiredbase64stringurlstringtypestringrequiredmimeTypestringfilenamestringcaptionstringquotedMessageIdstringtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","url": "https://example.com/photo.jpg","type": "image","caption": "Check this out!","token": "your-secret-token"}
{"success": true,"messageId": "12346"}
https://api.supergreen.cc/sendTelegramPollSend a poll to a Telegram group or chat.
phoneNumberstringrequiredchatIdstringrequirednamestringrequiredchoicesarrayrequiredselectableCountnumbertokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","name": "Where should we meet?","choices": ["Tel Aviv","New York","Remote"],"selectableCount": 1,"token": "your-secret-token"}
{"success": true,"messageId": "12347"}
https://api.supergreen.cc/editTelegramMessageEdit a previously sent Telegram message.
phoneNumberstringrequiredchatIdstringrequiredmessageIdstringrequirednewTextstringrequiredtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","messageId": "12345","newText": "Updated message text!","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/deleteTelegramMessageDelete a Telegram message for everyone (where permitted).
phoneNumberstringrequiredchatIdstringrequiredmessageIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","messageId": "12345","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/sendTelegramReactionSend an emoji reaction to a Telegram message.
phoneNumberstringrequiredchatIdstringrequiredmessageIdstringrequiredreactionstringrequiredtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","messageId": "12345","reaction": "๐","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/sendTelegramTypingIndicationShow the 'typing...' indicator in a Telegram chat.
phoneNumberstringrequiredchatIdstringrequireddurationMsnumbertokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","durationMs": 4000,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/stopTelegramTypingIndicationStop showing the 'typing...' indicator in a Telegram chat.
phoneNumberstringrequiredchatIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/getTelegramMessagesRetrieve recent messages from a Telegram conversation or group, optionally filtered by reconstructed threadId.
phoneNumberstringrequiredchatIdstringrequiredcountintegeridstringfromMebooleandirectionstringthreadIdstringtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","count": 20,"token": "your-secret-token"}
{"success": true,"messages": [{"id": "12345","chatId": "-1001234567890","authorId": "987654321","authorName": "Alice","text": "Hello everyone!","time": 1703251200000,"fromMe": false,"type": "chat"}]}
https://api.supergreen.cc/listTelegramChatsList recent Telegram chats (DMs, groups, and channels) ordered by most recent activity.
phoneNumberstringrequiredlimitintegerquerystringtokenstringrequired{"phoneNumber": "15551234567","limit": 20,"token": "your-secret-token"}
{"success": true,"chats": [{"id": "-1001234567890","name": "My Telegram Group","isGroup": true,"lastMessageText": "Hello everyone!","lastMessageTime": 1703251200000,"lastMessageFromMe": false,"unreadCount": 0}]}
https://api.supergreen.cc/searchTelegramContactsSearch Telegram contacts, users, groups, and channels to find their chat ID.
phoneNumberstringrequiredquerystringrequiredlimitintegertokenstringrequired{"phoneNumber": "15551234567","query": "Alice","limit": 10,"token": "your-secret-token"}
{"success": true,"contacts": [{"id": "987654321","name": "Alice Cohen","pushname": "alice","isGroup": false}]}
https://api.supergreen.cc/searchTelegramMessagesSearch Telegram messages containing a text query, optionally scoped to one chat.
phoneNumberstringrequiredquerystringrequiredchatIdstringlimitintegertokenstringrequired{"phoneNumber": "15551234567","query": "launch","chatId": "-1001234567890","limit": 20,"token": "your-secret-token"}
{"success": true,"messages": [{"id": "12345","chatId": "-1001234567890","authorId": "987654321","authorName": "Alice","text": "Ready for launch!","time": 1703251200000,"fromMe": false,"type": "chat"}]}
https://api.supergreen.cc/setTelegramGroupThreadingEnable or disable opt-in Telegram group conversation threading across all groups on the line. Quote-chain and forum-topic resolution is instant and free; unquoted group messages use a fast decision model up to the monthly fair-use cap.
phoneNumberstringrequiredenabledbooleanrequiredtokenstringrequired{"phoneNumber": "15551234567","enabled": true,"token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/listTelegramThreadsList reconstructed Telegram group conversation threads ordered by most recent message from the account's isolated 7-day buffer (requires group threading enabled via setTelegramGroupThreading).
phoneNumberstringrequiredchatIdstringlimitintegermessagesPerThreadintegerquerystringtokenstringrequired{"phoneNumber": "15551234567","chatId": "-1001234567890","limit": 20,"messagesPerThread": 15,"token": "your-secret-token"}
{"success": true,"threads": [{"id": "7b2a9d20-5e7c-4d34-9b14-75a45f03e3a1","chatId": "-1001234567890","chatName": "My Telegram Group","viewerUrl": "https://supergreen.cc/threads/telegram/15551234567/7b2a9d20-5e7c-4d34-9b14-75a45f03e3a1","messageCount": 2,"firstMessageAt": 1703251200000,"lastMessageAt": 1703251260000,"messages": [{"id": "100","authorId": "987654321","authorName": "Alice","text": "Are we shipping today?","time": 1703251200000,"fromMe": false},{"id": "101","authorId": "123456789","authorName": "Bob","text": "Yes, rolling out now!","time": 1703251260000,"fromMe": false,"quotedMessageId": "100"}]}]}
https://api.supergreen.cc/getTelegramThreadRetrieve a single reconstructed Telegram group conversation thread and its messages by threadId.
phoneNumberstringrequiredthreadIdstringrequiredchatIdstringcountintegertokenstringrequired{"phoneNumber": "15551234567","threadId": "7b2a9d20-5e7c-4d34-9b14-75a45f03e3a1","count": 50,"token": "your-secret-token"}
{"success": true,"thread": {"id": "7b2a9d20-5e7c-4d34-9b14-75a45f03e3a1","chatId": "-1001234567890","chatName": "My Telegram Group","viewerUrl": "https://supergreen.cc/threads/telegram/15551234567/7b2a9d20-5e7c-4d34-9b14-75a45f03e3a1","messageCount": 2,"firstMessageAt": 1703251200000,"lastMessageAt": 1703251260000,"messages": [{"id": "100","authorId": "987654321","authorName": "Alice","text": "Are we shipping today?","time": 1703251200000,"fromMe": false}]}}
https://api.supergreen.cc/getTelegramGroupsRetrieve a list of Telegram groups and channels with admin status.
phoneNumberstringrequiredtokenstringrequired{"phoneNumber": "15551234567","token": "your-secret-token"}
{"success": true,"warning": "","cacheMaxAgeSeconds": 0,"groups": [{"id": "-1001234567890","name": "My Telegram Group","isAdmin": true}]}
https://api.supergreen.cc/joinTelegramGroupJoin a Telegram group or channel by username or invite link.
phoneNumberstringrequiredgroupUsernamestringrequiredtokenstringrequired{"phoneNumber": "15551234567","groupUsername": "https://t.me/+AbCdEf123456","token": "your-secret-token"}
{"success": true,"status": "joined","chatId": "-1001234567890"}
https://api.supergreen.cc/getTelegramGroupMembersGet members of a Telegram group or supergroup along with their admin status.
phoneNumberstringrequiredgroupIdstringrequiredlimitintegertokenstringrequired{"phoneNumber": "15551234567","groupId": "-1001234567890","limit": 100,"token": "your-secret-token"}
{"success": true,"members": [{"id": "987654321","name": "Alice Cohen","pushname": "alice","isAdmin": true,"isSuperAdmin": true}]}
https://api.supergreen.cc/addUserToTelegramGroupAdd a user to a Telegram group where you have permission.
phoneNumberstringrequiredgroupIdstringrequireduserIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","groupId": "-1001234567890","userId": "@alice","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/removeUserFromTelegramGroupRemove a user from a Telegram group where you are an admin.
phoneNumberstringrequiredgroupIdstringrequireduserIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","groupId": "-1001234567890","userId": "@alice","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/getTelegramGroupInviteLinkGet or export an invite link for a Telegram group.
phoneNumberstringrequiredgroupIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","groupId": "-1001234567890","token": "your-secret-token"}
{"success": true,"inviteLink": "https://t.me/+AbCdEf123456"}
https://api.supergreen.cc/blockTelegramContactBlock a Telegram user.
phoneNumberstringrequiredcontactIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","contactId": "@spammer","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/unblockTelegramContactUnblock a previously blocked Telegram user.
phoneNumberstringrequiredcontactIdstringrequiredtokenstringrequired{"phoneNumber": "15551234567","contactId": "@spammer","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/setTelegramWebhookSet or update the webhook URL for a Telegram account.
phoneNumberstringrequiredurlstringnullrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/telegram-webhook","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/addTelegramWebhookAdd an additional webhook URL for a Telegram account.
phoneNumberstringrequiredurlstringrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/telegram-webhook","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/removeTelegramWebhookRemove a webhook URL from a Telegram account.
phoneNumberstringrequiredurlstringrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/telegram-webhook","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/testTelegramWebhookSend a signed test Telegram webhook event to verify your endpoint receives and verifies Supergreen payloads.
phoneNumberstringrequiredurlstringrequiredtokenstringrequired{"phoneNumber": "15551234567","url": "https://your-server.com/telegram-webhook","token": "your-secret-token"}
{"success": true,"status": 200}
https://api.supergreen.cc/changeTelegramAccountNameChange the display name of your Telegram account.
phoneNumberstringrequirednamestringrequiredtokenstringrequired{"phoneNumber": "15551234567","name": "Supergreen Support","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/changeTelegramAccountBioChange the bio/about text of your Telegram account.
phoneNumberstringrequiredbiostringrequiredtokenstringrequired{"phoneNumber": "15551234567","bio": "Automated assistant powered by Supergreen","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/changeTelegramAccountAvatarChange the profile photo of your Telegram account.
phoneNumberstringrequiredimageBase64stringrequiredtokenstringrequired{"phoneNumber": "15551234567","imageBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRg==","token": "your-secret-token"}
{"success": true}
https://api.supergreen.cc/addAccountAdminShare a line/account with a teammate by adding their email as a co-admin (+ Add Admin). Co-admins can view and operate the shared line from their own Supergreen login without consuming an extra billing slot. The invited email must have signed in at https://supergreen.cc at least once first.
refreshTokenstringrequiredaccountIdstringrequiredemailstringrequiredaccountTypestring{"refreshToken": "your-session-refresh-token","accountId": "142ed1c4-bc61-4a65-acab-3d7e69b3292d","email": "teammate@example.com","accountType": "whatsapp"}
{"success": true}
https://api.supergreen.cc/removeAccountAdminRemove a co-admin from a shared line/account. Neither the billing owner (billingUser) nor the last remaining admin can be removed.
refreshTokenstringrequiredaccountIdstringrequiredadminIdstringemailstringaccountTypestring{"refreshToken": "your-session-refresh-token","accountId": "142ed1c4-bc61-4a65-acab-3d7e69b3292d","email": "teammate@example.com","accountType": "whatsapp"}
{"success": true}
https://api.supergreen.cc/addFbGrouprefreshTokenstringrequiredfbAccountIdstringrequiredgroupIdstringrequirednamestring{"refreshToken": "your-user-session-token","fbAccountId": "fb-account-12345","groupId": "123456789","name": "Tech Enthusiasts"}
{"success": true}
https://api.supergreen.cc/removeFbGrouprefreshTokenstringrequiredfbGroupIdstringrequired{"refreshToken": "your-user-session-token","fbGroupId": "fb-group-12345"}
{"success": true}
https://api.supergreen.cc/commentOnFbPosttokenstringrefreshTokenstringfbAccountIdstringgroupIdstringrequiredpostIdstringrequiredtextstringrequired{"token": "your-secret-token","fbAccountId": "fb-account-12345","groupId": "123456789","postId": "987654321","text": "Great post!"}
{"success": true}
https://api.supergreen.cc/postToFbGrouptokenstringrefreshTokenstringfbAccountIdstringgroupIdstringrequiredpoststringtextstringasyncboolean{"token": "your-secret-token","groupId": "123456789","post": "Hello Facebook group! This is an automated post."}
{"success": true}
https://api.supergreen.cc/getFbGroupstokenstringrefreshTokenstringfbAccountIdstringrefreshbooleanasyncboolean{"token": "your-secret-token","refresh": false}
{"success": true,"groups": [{"id": "fb-group-1","groupId": "123456789","name": "Tech Enthusiasts","lastScrapedAt": 1700000000000}]}
https://api.supergreen.cc/getFbOperationtokenstringrefreshTokenstringoperationIdstringrequired{"token": "your-secret-token","operationId": "op_fb_123456789"}
{"success": true,"operationId": "op_fb_123456789","status": "completed","result": {"success": true}}
https://api.supergreen.cc/sendFbDirectMessageSend a direct message on Facebook Messenger using the connected Facebook account.
tokenstringrefreshTokenstringfbAccountIdstringrecipientUserIdstringrequiredtextstringrequiredasyncboolean{"token": "your-secret-token","recipientUserId": "100012345678901","text": "Hello from Supergreen!"}
{"success": true}
https://api.supergreen.cc/getFbDirectMessagesRead recent Facebook Messenger inbox conversations, or read messages from a specific Messenger thread/user.
tokenstringrefreshTokenstringfbAccountIdstringconversationIdstringrecipientUserIdstringlimitnumberasyncboolean{"token": "your-secret-token","conversationId": "100012345678901","limit": 20}
{"success": true,"threadId": "100012345678901","participantName": "Jane Doe","messages": [{"senderName": "Jane Doe","text": "Hi! Is this still available?","time": "10:42 AM","isFromMe": false},{"senderName": "You","text": "Yes, happy to share details!","time": "10:45 AM","isFromMe": true}]}
https://api.supergreen.cc/scanFbMarketplacetokenstringrefreshTokenstringfbAccountIdstringquerystringrequiredminPricenumbermaxPricenumberlimitnumbermaxScrollsnumber{"token": "your-secret-token","query": "laptops","minPrice": 300,"maxPrice": 1500}
{"success": true,"listings": [{"itemId": "1360403449376994","title": "Lenovo ThinkPad T14 Gen 2","price": "$500","location": "San Francisco, CA","itemUrl": "https://www.facebook.com/marketplace/item/1360403449376994/","imageUrl": "https://scontent-atl3-3.xx.fbcdn.net/v/..."}]}
https://api.supergreen.cc/addLinkedInConnectiontokenstringrefreshTokenstringlinkedInAccountIdstringprofileUrlstringrequiredmessagestring{"token": "your-secret-token","profileUrl": "https://www.linkedin.com/in/satyanadella","message": "Hi Satya, I would love to connect!"}
{"success": true,"status": "invitation_sent","connected": false}
https://api.supergreen.cc/searchLinkedInPeopletokenstringrefreshTokenstringlinkedInAccountIdstringquerystringrequiredlimitnumberpagenumber{"token": "your-secret-token","query": "software engineer google","limit": 10}
{"success": true,"results": [{"name": "Jane Doe","headline": "Staff Software Engineer at Google","location": "San Francisco Bay Area","profileUrl": "https://www.linkedin.com/in/janedoe","connectionDegree": "2nd","actionText": "Connect"}]}
https://api.supergreen.cc/sendLinkedInMessagetokenstringrefreshTokenstringlinkedInAccountIdstringprofileUrlstringconversationIdstringtextstringrequired{"token": "your-secret-token","profileUrl": "https://www.linkedin.com/in/janedoe","text": "Hi Jane, great connecting with you!"}
{"success": true,"sent": true}
https://api.supergreen.cc/getLinkedInMessagestokenstringrefreshTokenstringlinkedInAccountIdstringconversationIdstringprofileUrlstringlimitnumber{"token": "your-secret-token","limit": 20}
{"success": true,"conversations": [{"threadId": "2-YmZmNDkyMGUt...","participantName": "Jane Doe","participantProfileUrl": "https://www.linkedin.com/in/janedoe","lastMessage": "Sounds good, talk soon!","lastMessageTime": "2h","unread": false}]}
https://api.supergreen.cc/getLinkedInProfiletokenstringrefreshTokenstringlinkedInAccountIdstringprofileUrlstringrequired{"token": "your-secret-token","profileUrl": "https://www.linkedin.com/in/satyanadella"}
{"success": true,"profile": {"name": "Satya Nadella","headline": "Chairman and CEO at Microsoft","about": "Leading Microsoft's mission to empower every person...","location": "Greater Seattle Area","connectionDegree": "2nd","followerCount": "10M+ followers","profileUrl": "https://www.linkedin.com/in/satyanadella"}}
https://api.supergreen.cc/createLinkedInPostCreate and publish a new post on your LinkedIn feed.
tokenstringrefreshTokenstringlinkedInAccountIdstringtextstringrequiredvisibilitystring{"token": "your-secret-token","text": "Excited to share our latest product update!","visibility": "ANYONE"}
{"success": true,"posted": true,"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7123456789012345678/"}
https://api.supergreen.cc/sendInstagramDirectMessageSend a direct message on Instagram to a username or existing DM thread.
tokenstringrefreshTokenstringinstagramAccountIdstringusernamestringthreadIdstringconversationIdstringtextstringrequired{"token": "your-secret-token","username": "natgeo","text": "Hello from Supergreen!"}
{"success": true,"sent": true,"threadId": "340282366841710300949128123456789012345"}
https://api.supergreen.cc/getInstagramDirectMessagesList recent Instagram DM inbox conversations, or read messages from a specific DM thread or user.
tokenstringrefreshTokenstringinstagramAccountIdstringthreadIdstringconversationIdstringusernamestringlimitinteger{"token": "your-secret-token","limit": 20}
{"success": true,"conversations": [{"threadId": "340282366841710300949128123456789012345","participantName": "Jane Doe","participantUsername": "janedoe","threadUrl": "https://www.instagram.com/direct/t/340282366841710300949128123456789012345/","lastMessage": "Sounds good, talk soon!","lastMessageTime": "2026-11-19T12:00:00.000Z","isFromMe": false,"unread": false}]}
https://api.supergreen.cc/createInstagramPostPublish a new photo or video post to your Instagram feed.
tokenstringrefreshTokenstringinstagramAccountIdstringmediaUrlstringmediaBase64stringmimeTypestringfilenamestringcaptionstring{"token": "your-secret-token","mediaUrl": "https://example.com/photo.jpg","caption": "Behind the scenes at Supergreen!"}
{"success": true,"posted": true,"postUrl": "https://www.instagram.com/p/Cx123456789/"}
https://api.supergreen.cc/createInstagramStoryPublish a photo to your Instagram Story.
tokenstringrefreshTokenstringinstagramAccountIdstringmediaUrlstringmediaBase64stringmimeTypestringfilenamestring{"token": "your-secret-token","mediaUrl": "https://example.com/story.jpg"}
{"success": true,"posted": true}
Successful calls return 200 OK. Errors return JSON details alongside standard HTTP status codes (400, 401, 404, 500):
{"error": "Authentication failed","message": "Invalid token provided"}