API Reference

Integrate WhatsApp, Telegram, Facebook, Instagram, and LinkedIn automation via JSON over HTTPS.

Getting Started

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 Integration

n8n Cloud: Search Supergreen directly in the node picker (+).
Self-hosted: Settings โ†’ Community Nodes โ†’ Install n8n-nodes-supergreen.

n8n-nodes-supergreen

Starter Workflows

Copy JSON and press Ctrl+V / Cmd+V on your n8n canvas:

View GitHub Repository โ†’

Chat SDK Adapter

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.

Bot Setup

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.");
});

Webhook Route (Next.js / Vercel)

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),
});
}
View GitHub Repository โ†’

Make.com Integration

Import ready scenario blueprints into Make.com via the More (...) โ†’ Import Blueprint toolbar menu:

Zapier Integration

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!"
}
}

Node.js Quick Start

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!');

Webhook Events

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.

WhatsApp Group Threading & Thread Viewer

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).

  • Enable thread resolution: Call 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.
  • Real-time webhooks: Group message and edit events automatically include threadId and thread ({ id, viewerUrl, decision, relatedMsgId?, messages }).
  • Dedicated Thread Viewer & Deep Links: Lines with thread resolution enabled unlock a clean, dedicated Threads page (accessible via Open Threads or the View Threads button on the line card) to browse grouped conversations by group, search text or authors, copy a 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.
  • Retrieve threads via API: Use 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 line
await 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 threadId
const { 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());

Endpoints

sendMessage

POSThttps://api.supergreen.cc/sendMessage

Send a text message to any WhatsApp number or group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
toNumberstringrequired
Recipient's WhatsApp ID (e.g., '972501234567@c.us' for individuals or 'group-id@g.us' for groups)
messagestringrequired
The text message to send
linkPreviewbooleanrequired
Whether to show link previews for URLs in the message
quotedMessageIdstring
ID of a message to quote/reply to
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"toNumber": "15559876543@c.us",
"message": "Hello! This is a test message.",
"linkPreview": false,
"token": "your-secret-token"
}
Response
{
"messageId": "3EB0123456789ABCDEF"
}

sendMedia

POSThttps://api.supergreen.cc/sendMedia

Send images, videos, or documents with optional caption to any WhatsApp number or group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
toNumberstringrequired
Recipient's WhatsApp ID
base64string
Base64 encoded media data (with or without data URL prefix)
urlstring
Public HTTP/HTTPS URL of the media file to send
typestringrequired
Media type: 'image', 'video', 'document', or 'audio'
mimeTypestring
Media MIME type (e.g., 'image/jpeg', 'video/mp4', 'application/pdf'). Auto-detected from data URL if not provided
filenamestring
Filename for the media. Auto-generated from MIME type if not provided
captionstring
Optional caption text for the media
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"toNumber": "15559876543@c.us",
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "image",
"caption": "Check out this image!",
"token": "your-secret-token"
}
Response
{
"messageId": "3EB0987654321FEDCBA"
}

sendContact

POSThttps://api.supergreen.cc/sendContact

Send a contact card (vCard) to any WhatsApp number or group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
toNumberstringrequired
Recipient's WhatsApp ID (e.g., '972501234567@c.us' for individuals or 'group-id@g.us' for groups)
contactIdstringrequired
Contact's WhatsApp ID or phone number (e.g., '972509876543@c.us' or '972509876543')
namestringrequired
Display name of the contact
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"toNumber": "15559876543@c.us",
"contactId": "15550001111@c.us",
"name": "Jane Doe",
"token": "your-secret-token"
}
Response
{
"messageId": "3EB0CONTACT56789ABCDEF"
}

sendPoll

POSThttps://api.supergreen.cc/sendPoll

Send a poll to a WhatsApp group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
toNumberstringrequired
Group ID to send the poll to (e.g., '120363123456789012@g.us')
namestringrequired
The poll question/title
choicesarrayrequired
Array of poll options (minimum 2)
selectableCountnumber
How many options a voter may select (default: 1)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"toNumber": "120363123456789012@g.us",
"name": "What's your favorite color?",
"choices": [
"Red",
"Blue",
"Green"
],
"token": "your-secret-token"
}
Response
{
"messageId": "3EB0POLL56789ABCDEF"
}

sendInteractiveResponse

POSThttps://api.supergreen.cc/sendInteractiveResponse

Reply to a WhatsApp interactive button, list, template button, or native flow menu by selecting one of its options.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
toNumberstringrequired
Recipient's WhatsApp ID (e.g., '972501234567@c.us')
quotedMessageIdstringrequired
ID of the interactive button, list, template button, or native flow message being answered
kindstringrequired
Interactive menu kind: 'buttons', 'list', 'template_buttons', or 'native_flow'
selectedIdstringrequired
The buttonId, rowId, or template button id of the selected option
selectedDisplayTextstringrequired
The visible label/title of the selected option
selectedDescriptionstring
Optional description of the selected list row
selectedIndexinteger
0-based button index when answering a template_buttons message
nativeFlowNamestring
Native flow button name (e.g., 'quick_reply' or 'single_select') when kind is 'native_flow'
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"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"
}
Response
{
"messageId": "3EB0RESP56789ABCDEF"
}

editMessage

POSThttps://api.supergreen.cc/editMessage

Edit a previously sent message.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
messageIdstringrequired
ID of the message to edit (returned from sendMessage)
newTextstringrequired
The new text for the message
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"messageId": "3EB0123456789ABCDEF",
"newText": "Updated message text",
"token": "your-secret-token"
}
Response
{
"success": true
}

deleteMessage

POSThttps://api.supergreen.cc/deleteMessage

Delete a previously sent message.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
chatIdstringrequired
Chat ID (e.g. 972501234567@c.us for 1:1 or groupId@g.us for group)
messageIdstringrequired
ID of the message to delete
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"chatId": "15551234567@c.us",
"messageId": "3EB0123456789ABCDEF",
"token": "your-secret-token"
}
Response
{
"success": true
}

sendReaction

POSThttps://api.supergreen.cc/sendReaction

Send a reaction emoji to a message.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
messageIdstringrequired
ID of the message to react to
reactionstringrequired
Reaction emoji to send
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"messageId": "3EB0123456789ABCDEF",
"reaction": "๐Ÿ‘",
"token": "your-secret-token"
}
Response
{
"success": true
}

sendTypingIndication

POSThttps://api.supergreen.cc/sendTypingIndication

Show the 'typing...' indicator in a chat to make your bot feel more human.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
chatIdstringrequired
Chat ID where typing indicator should appear
durationMsnumber
Duration in milliseconds (optional, defaults to standard duration)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"chatId": "15559876543@c.us",
"durationMs": 3000,
"token": "your-secret-token"
}
Response
{
"success": true
}

stopTypingIndication

POSThttps://api.supergreen.cc/stopTypingIndication

Stop showing the 'typing...' indicator in a chat.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
chatIdstringrequired
Chat ID where typing indicator should stop
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"chatId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"success": true
}

getMessages

POSThttps://api.supergreen.cc/getMessages

Retrieve 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).

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
chatIdstringrequired
Chat ID to fetch messages from (e.g., '972501234567@c.us', '120363123456789012@g.us', or bare phone number)
countinteger
Number of messages to return (default: 20, max: 200)
idstring
Message ID cursor for pagination
fromMeboolean
Filter by whether messages were sent by you
directionstring
Fetch messages 'before' or 'after' the given message ID (default: 'before')
threadIdstring
Optional reconstructed group thread ID to filter messages to that thread
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"chatId": "15559876543@c.us",
"count": 20,
"token": "your-secret-token"
}
Response
{
"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"
}
]
}

listChats

POSThttps://api.supergreen.cc/listChats

List recent WhatsApp chats (1:1 and groups) ordered by most recent activity from the active line's isolated 7-day sync buffer.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
limitinteger
Maximum number of recent chats to return (default: 20, max: 100)
querystring
Optional case-insensitive filter matched against chat name, phone number, or last message text
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"limit": 20,
"token": "your-secret-token"
}
Response
{
"success": true,
"chats": [
{
"id": "15559876543@c.us",
"name": "John Doe",
"isGroup": false,
"lastMessageText": "Hey, are we still on for today?",
"lastMessageTime": 1703251200000,
"lastMessageFromMe": false
}
]
}

listThreads

POSThttps://api.supergreen.cc/listThreads

List 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).

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
chatIdstring
Optional group chat ID ('...@g.us') to filter threads to a single group
limitinteger
Maximum number of reconstructed group threads to return ordered by most recent message (default: 30, max: 100)
messagesPerThreadinteger
Maximum number of recent messages to include per thread (default: 20, max: 50)
querystring
Optional case-insensitive filter matched against group name, chat ID, thread ID, author, or message text
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"chatId": "120363123456789012@g.us",
"limit": 30,
"messagesPerThread": 20,
"token": "your-secret-token"
}
Response
{
"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"
}
]
}
]
}

getThread

POSThttps://api.supergreen.cc/getThread

Retrieve a single reconstructed WhatsApp group conversation thread and its messages by threadId from the active line's isolated 7-day buffer.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
threadIdstringrequired
Reconstructed WhatsApp group thread ID (from webhook threadId / thread.id, listThreads, or the dashboard Thread Viewer)
chatIdstring
Optional group chat ID ('...@g.us') to scope the lookup; omit to retrieve by threadId alone
countinteger
Maximum number of messages to return in the thread (default: 50, max: 200)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"threadId": "b1f8c4d2-1234-4a56-8b90-abcdef123456",
"count": 50,
"token": "your-secret-token"
}
Response
{
"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"
}
]
}
}

searchContacts

POSThttps://api.supergreen.cc/searchContacts

Search WhatsApp contacts and groups by name or phone number to find their chat ID.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
querystringrequired
Name, pushname, or phone number substring to search for
limitinteger
Maximum number of matching contacts/groups to return (default: 20, max: 50)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"query": "John",
"limit": 10,
"token": "your-secret-token"
}
Response
{
"success": true,
"contacts": [
{
"id": "15559876543@c.us",
"name": "John Doe",
"pushname": "John",
"isGroup": false
}
]
}

searchMessages

POSThttps://api.supergreen.cc/searchMessages

Search recent WhatsApp messages containing a text query in the active line's isolated 7-day sync buffer, optionally scoped to one chat.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
querystringrequired
Case-insensitive text substring to search for in recent messages
chatIdstring
Optional chat ID to restrict search to a single conversation or group
limitinteger
Maximum number of matching messages to return (default: 20, max: 100)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"query": "dinner",
"limit": 20,
"token": "your-secret-token"
}
Response
{
"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"
}
]
}

getGroups

POSThttps://api.supergreen.cc/getGroups

Retrieve a list of WhatsApp groups with admin status for each group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
useCacheboolean
Whether to use cached group metadata (defaults to true). Set to false for a fresh fetch.
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"token": "your-secret-token"
}
Response
{
"groups": [
{
"id": "120363123456789012@g.us",
"name": "My Cool Group",
"isAdmin": true
},
{
"id": "120363987654321098@g.us",
"name": "Another Group",
"isAdmin": false
}
]
}

addUserToWhatsAppGroup

POSThttps://api.supergreen.cc/addUserToWhatsAppGroup

Add a user to a WhatsApp group where you are an admin.

Authentication: Required - Include token in request body
Request body
groupIdstringrequired
Group ID (e.g., '120363123456789012@g.us')
userIdstringrequired
User ID to add (e.g., '972509876543@c.us')
fromNumberstringrequired
Your WhatsApp account phone number
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupId": "120363123456789012@g.us",
"userId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"success": true
}

removeUserFromWhatsAppGroup

POSThttps://api.supergreen.cc/removeUserFromWhatsAppGroup

Remove a user from a WhatsApp group where you are an admin.

Authentication: Required - Include token in request body
Request body
groupIdstringrequired
Group ID (e.g., '120363123456789012@g.us')
userIdstringrequired
User ID to remove (e.g., '972509876543@c.us')
fromNumberstringrequired
Your WhatsApp account phone number
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupId": "120363123456789012@g.us",
"userId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"success": true
}

getCommonWhatsappGroups

POSThttps://api.supergreen.cc/getCommonWhatsappGroups

Get a list of WhatsApp groups that both you and another user are members of.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
userIdstringrequired
User ID to check common groups with
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"userId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"groups": [
{
"id": "120363123456789012@g.us",
"name": "Shared Group"
}
]
}

getWhatsappJoinRequests

POSThttps://api.supergreen.cc/getWhatsappJoinRequests

Get pending join requests for a group where you are an admin.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
groupIdstringrequired
Group ID to check for join requests
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupId": "120363123456789012@g.us",
"token": "your-secret-token"
}
Response
{
"requests": [
{
"requesterId": "15559876543@c.us",
"addedById": null,
"parentGroupId": null,
"method": "non_admin_add",
"timestamp": 1703251200000
}
]
}

approveWhatsappJoinRequests

POSThttps://api.supergreen.cc/approveWhatsappJoinRequests

Approve one or more pending join requests for a group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
groupIdstringrequired
Group ID where requests should be approved
requesterIdsarray | null
Array of requester IDs to approve, or null to approve all
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupId": "120363123456789012@g.us",
"requesterIds": [
"15559876543@c.us"
],
"token": "your-secret-token"
}
Response
{
"results": [
{
"requesterId": "15559876543@c.us",
"error": null,
"message": "Approved successfully"
}
]
}

rejectWhatsappJoinRequests

POSThttps://api.supergreen.cc/rejectWhatsappJoinRequests

Reject one or more pending join requests for a group.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
groupIdstringrequired
Group ID where requests should be rejected
requesterIdsarrayrequired
Array of requester IDs to reject
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupId": "120363123456789012@g.us",
"requesterIds": [
"15559876543@c.us"
],
"token": "your-secret-token"
}
Response
{
"results": [
{
"requesterId": "15559876543@c.us",
"error": null,
"message": "Rejected successfully"
}
]
}

getGroupMembers

POSThttps://api.supergreen.cc/getGroupMembers

Get 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.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
groupIdstringrequired
Group ID (e.g., '120363123456789012@g.us')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupId": "120363123456789012@g.us",
"token": "your-secret-token"
}
Response
{
"members": [
{
"id": "15559876543@c.us",
"isAdmin": true,
"isSuperAdmin": true
},
{
"id": "15551111111@c.us",
"isAdmin": false,
"isSuperAdmin": false
}
]
}

getWhatsappGroupDetails

POSThttps://api.supergreen.cc/getWhatsappGroupDetails

Get details about a WhatsApp group using its invite link, including group name, description, size, and participants.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
groupLinkstringrequired
WhatsApp group invite link (e.g., 'https://chat.whatsapp.com/AbCdEfGhIjK')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"groupLink": "https://chat.whatsapp.com/AbCdEfGhIjK",
"token": "your-secret-token"
}
Response
{
"success": true,
"id": "120363123456789012@g.us",
"subject": "My Group",
"desc": "Group description",
"size": 42,
"participants": [
{
"id": "15559876543@c.us",
"isAdmin": true,
"isSuperAdmin": false
}
]
}

blockContact

POSThttps://api.supergreen.cc/blockContact

Block a WhatsApp contact.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
contactIdstringrequired
Contact ID to block (e.g., '972509876543@c.us')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"contactId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"success": true
}

reportContact

POSThttps://api.supergreen.cc/reportContact

Report a contact/sender to WhatsApp as spam.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
contactIdstringrequired
Contact ID to report as spam (e.g., '972509876543@c.us')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"contactId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"success": true
}

unblockContact

POSThttps://api.supergreen.cc/unblockContact

Unblock a previously blocked WhatsApp contact.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
contactIdstringrequired
Contact ID to unblock (e.g., '972509876543@c.us')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"contactId": "15559876543@c.us",
"token": "your-secret-token"
}
Response
{
"success": true
}

convertLidToNumber

POSThttps://api.supergreen.cc/convertLidToNumber

Convert 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.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
lidstringrequired
LID to resolve (e.g., '119846817792023@lid')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"lid": "119846817792023@lid",
"token": "your-secret-token"
}
Response
{
"number": "15559876543@c.us"
}

checkWhatsappNumber

POSThttps://api.supergreen.cc/checkWhatsappNumber

Check whether a phone number has an active WhatsApp account.

Authentication: Required - Include token in request body
Request body
fromNumberstringrequired
Your WhatsApp account phone number
targetNumberstringrequired
Phone number to check in international format (e.g., '972501234567' or '+972501234567')
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"fromNumber": "15551234567",
"targetNumber": "15559876543",
"token": "your-secret-token"
}
Response
{
"success": true,
"exists": true,
"jid": "15559876543@c.us",
"number": "15559876543"
}

setWebhook

POSThttps://api.supergreen.cc/setWebhook

Set or update the webhook URL to receive incoming messages and events.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
urlstringnullrequired
Webhook URL to receive updates, or null to remove webhook
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/webhook",
"token": "your-secret-token"
}
Response
{}

addWebhook

POSThttps://api.supergreen.cc/addWebhook

Add 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.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
urlstringrequired
Webhook URL to add
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/webhook",
"token": "your-secret-token"
}
Response
{}

removeWebhook

POSThttps://api.supergreen.cc/removeWebhook

Remove a webhook URL from the account. If the URL matches the legacy webhook field, that is also cleared.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
urlstringrequired
Webhook URL to remove
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/webhook",
"token": "your-secret-token"
}
Response
{}

reconnect

POSThttps://api.supergreen.cc/reconnect

Manually 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.

Authentication: Required - Include token in request body
Request body
numberstringrequired
Your WhatsApp account phone number
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"number": "15551234567",
"token": "your-secret-token"
}
Response
{}

setLoginMethod

POSThttps://api.supergreen.cc/setLoginMethod

Set 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.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
preferCodeLoginbooleanrequired
Set to true for pairing code login, false for QR code login
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"preferCodeLogin": true,
"token": "your-secret-token"
}
Response
{
"success": true
}

setGroupThreading

POSThttps://api.supergreen.cc/setGroupThreading

Enable 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.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
enabledbooleanrequired
Set to true to enable opt-in WhatsApp group thread reconstruction across all groups on this line (attaches threadId and thread.messages to group webhooks and threadId to getMessages)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"enabled": true,
"token": "your-secret-token"
}
Response
{
"success": true
}

clearCredentials

POSThttps://api.supergreen.cc/clearCredentials

Clear all stored credentials for your WhatsApp account. Use this to reset authentication.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"token": "your-secret-token"
}
Response
{
"success": true
}

changeWhatsappAccountName

POSThttps://api.supergreen.cc/changeWhatsappAccountName

Change the display name of your WhatsApp account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
namestringrequired
The new display name for your WhatsApp account
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"name": "My Business Bot",
"token": "your-secret-token"
}
Response
{}

changeWhatsappAccountAvatar

POSThttps://api.supergreen.cc/changeWhatsappAccountAvatar

Change the profile picture of your WhatsApp account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
imageBase64stringrequired
Base64-encoded JPEG image. Can optionally include data URI prefix (data:image/jpeg;base64,...)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"imageBase64": "/9j/4AAQSkZJRg...",
"token": "your-secret-token"
}
Response
{}

changeWhatsappAccountBio

POSThttps://api.supergreen.cc/changeWhatsappAccountBio

Change the bio/about text of your WhatsApp account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
biostringrequired
The new bio/about text for your account
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"bio": "Powered by Supergreen",
"token": "your-secret-token"
}
Response
{}

changeWhatsappPrivacySettings

POSThttps://api.supergreen.cc/changeWhatsappPrivacySettings

Change the privacy settings of your WhatsApp account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your WhatsApp account phone number
categorystringrequired
The privacy category to update ('about' or 'profilePic')
valuestringrequired
Who can see this information ('all' for Everyone, 'contacts' for My Contacts, 'none' for Nobody)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"category": "about",
"value": "all",
"token": "your-secret-token"
}
Response
{}

submitTelegramCode

POSThttps://api.supergreen.cc/submitTelegramCode

Authentication: Required - Include refreshToken in request body (injected automatically by call_supergreen_user_api)
Request body
refreshTokenstringrequired
phoneNumberstringrequired
codestringrequired
Example
Request
{
"phoneNumber": "15551234567",
"code": "12345",
"token": "your-secret-token"
}
Response
{
"success": true,
"needsPassword": false
}

submitTelegramPassword

POSThttps://api.supergreen.cc/submitTelegramPassword

Authentication: Required - Include refreshToken in request body (injected automatically by call_supergreen_user_api)
Request body
refreshTokenstringrequired
phoneNumberstringrequired
passwordstringrequired
Example
Request
{
"phoneNumber": "15551234567",
"password": "your-telegram-2fa-password",
"token": "your-secret-token"
}
Response
{
"success": true
}

reconnectTelegram

POSThttps://api.supergreen.cc/reconnectTelegram

Reconnect a Telegram account or restart the login flow (QR code or login code).

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
preferQrLoginboolean
Optionally override login method for this reconnect (true for QR code, false for login code)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"preferQrLogin": true,
"token": "your-secret-token"
}
Response
{
"success": true
}

setTelegramLoginMethod

POSThttps://api.supergreen.cc/setTelegramLoginMethod

Set whether a Telegram account uses QR code scan or in-app login code when authenticating.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
preferQrLoginbooleanrequired
Set to true for QR code login (scan in Telegram -> Devices -> Link Desktop Device), false for in-app login code
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"preferQrLogin": true,
"token": "your-secret-token"
}
Response
{
"success": true
}

clearTelegramCredentials

POSThttps://api.supergreen.cc/clearTelegramCredentials

Log out and clear stored Telegram session credentials and local sync buffer for this account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"token": "your-secret-token"
}
Response
{
"success": true
}

sendTelegramMessage

POSThttps://api.supergreen.cc/sendTelegramMessage

Send a text message via Telegram, optionally replying to a message.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID, @username, or t.me link to send to (e.g., '-1001234567890' or '@example_channel')
textstringrequired
Message text
quotedMessageIdstring
Optional Telegram message ID to reply/quote
linkPreviewboolean
Whether to show link previews for URLs in the message
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "@example_channel",
"text": "Hello from Supergreen Telegram!",
"quotedMessageId": "42",
"linkPreview": false,
"token": "your-secret-token"
}
Response
{
"success": true,
"messageId": "12345"
}

sendTelegramMedia

POSThttps://api.supergreen.cc/sendTelegramMedia

Send images, videos, audio/voice notes, or documents to any Telegram chat or group.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID or @username to send media to
base64string
Base64 encoded media data (with or without data URL prefix)
urlstring
Public HTTP/HTTPS URL of the media file to send
typestringrequired
Media type: 'image', 'video', 'document', or 'audio'
mimeTypestring
Media MIME type (e.g., 'image/jpeg', 'video/mp4', 'application/pdf')
filenamestring
Filename for the media attachment
captionstring
Optional caption text for the media
quotedMessageIdstring
Optional Telegram message ID to reply to
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"url": "https://example.com/photo.jpg",
"type": "image",
"caption": "Check this out!",
"token": "your-secret-token"
}
Response
{
"success": true,
"messageId": "12346"
}

sendTelegramPoll

POSThttps://api.supergreen.cc/sendTelegramPoll

Send a poll to a Telegram group or chat.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Telegram chat or group ID
namestringrequired
The poll question/title
choicesarrayrequired
Array of poll options (2 to 10 options)
selectableCountnumber
Set > 1 to allow multiple answers (default: 1)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"name": "Where should we meet?",
"choices": [
"Tel Aviv",
"New York",
"Remote"
],
"selectableCount": 1,
"token": "your-secret-token"
}
Response
{
"success": true,
"messageId": "12347"
}

editTelegramMessage

POSThttps://api.supergreen.cc/editTelegramMessage

Edit a previously sent Telegram message.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID or @username containing the message
messageIdstringrequired
ID of the message to edit
newTextstringrequired
The new text for the message
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"messageId": "12345",
"newText": "Updated message text!",
"token": "your-secret-token"
}
Response
{
"success": true
}

deleteTelegramMessage

POSThttps://api.supergreen.cc/deleteTelegramMessage

Delete a Telegram message for everyone (where permitted).

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID or @username containing the message
messageIdstringrequired
ID of the message to delete
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"messageId": "12345",
"token": "your-secret-token"
}
Response
{
"success": true
}

sendTelegramReaction

POSThttps://api.supergreen.cc/sendTelegramReaction

Send an emoji reaction to a Telegram message.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID or @username containing the message
messageIdstringrequired
ID of the message to react to
reactionstringrequired
Reaction emoji to send (or empty string to remove reaction)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"messageId": "12345",
"reaction": "๐Ÿ‘",
"token": "your-secret-token"
}
Response
{
"success": true
}

sendTelegramTypingIndication

POSThttps://api.supergreen.cc/sendTelegramTypingIndication

Show the 'typing...' indicator in a Telegram chat.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID where typing indicator should appear
durationMsnumber
Optional duration in milliseconds before automatically cancelling typing status
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"durationMs": 4000,
"token": "your-secret-token"
}
Response
{
"success": true
}

stopTelegramTypingIndication

POSThttps://api.supergreen.cc/stopTelegramTypingIndication

Stop showing the 'typing...' indicator in a Telegram chat.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID where typing indicator should stop
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"token": "your-secret-token"
}
Response
{
"success": true
}

getTelegramMessages

POSThttps://api.supergreen.cc/getTelegramMessages

Retrieve recent messages from a Telegram conversation or group, optionally filtered by reconstructed threadId.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstringrequired
Chat ID or @username to fetch messages from
countinteger
Number of messages to return (default: 20, max: 200)
idstring
Message ID cursor for pagination
fromMeboolean
Filter by whether messages were sent by you
directionstring
Fetch messages 'before' or 'after' the given message ID (default: 'before')
threadIdstring
Optional reconstructed group thread ID to filter messages to that thread
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"count": 20,
"token": "your-secret-token"
}
Response
{
"success": true,
"messages": [
{
"id": "12345",
"chatId": "-1001234567890",
"authorId": "987654321",
"authorName": "Alice",
"text": "Hello everyone!",
"time": 1703251200000,
"fromMe": false,
"type": "chat"
}
]
}

listTelegramChats

POSThttps://api.supergreen.cc/listTelegramChats

List recent Telegram chats (DMs, groups, and channels) ordered by most recent activity.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
limitinteger
Maximum number of recent chats to return (default: 20, max: 100)
querystring
Optional case-insensitive filter matched against chat name, ID, or last message text
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"limit": 20,
"token": "your-secret-token"
}
Response
{
"success": true,
"chats": [
{
"id": "-1001234567890",
"name": "My Telegram Group",
"isGroup": true,
"lastMessageText": "Hello everyone!",
"lastMessageTime": 1703251200000,
"lastMessageFromMe": false,
"unreadCount": 0
}
]
}

searchTelegramContacts

POSThttps://api.supergreen.cc/searchTelegramContacts

Search Telegram contacts, users, groups, and channels to find their chat ID.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
querystringrequired
Name, @username, phone number, or ID substring to search for
limitinteger
Maximum number of matching contacts/groups to return (default: 20, max: 50)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"query": "Alice",
"limit": 10,
"token": "your-secret-token"
}
Response
{
"success": true,
"contacts": [
{
"id": "987654321",
"name": "Alice Cohen",
"pushname": "alice",
"isGroup": false
}
]
}

searchTelegramMessages

POSThttps://api.supergreen.cc/searchTelegramMessages

Search Telegram messages containing a text query, optionally scoped to one chat.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
querystringrequired
Case-insensitive text query to search for in messages
chatIdstring
Optional chat ID or @username to restrict search to one conversation or group
limitinteger
Maximum number of matching messages to return (default: 20, max: 100)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"query": "launch",
"chatId": "-1001234567890",
"limit": 20,
"token": "your-secret-token"
}
Response
{
"success": true,
"messages": [
{
"id": "12345",
"chatId": "-1001234567890",
"authorId": "987654321",
"authorName": "Alice",
"text": "Ready for launch!",
"time": 1703251200000,
"fromMe": false,
"type": "chat"
}
]
}

setTelegramGroupThreading

POSThttps://api.supergreen.cc/setTelegramGroupThreading

Enable 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.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
enabledbooleanrequired
Set to true to enable opt-in Telegram group thread reconstruction across all groups on this line (attaches threadId and thread.messages to group webhooks and enables listTelegramThreads/getTelegramThread)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"enabled": true,
"token": "your-secret-token"
}
Response
{
"success": true
}

listTelegramThreads

POSThttps://api.supergreen.cc/listTelegramThreads

List reconstructed Telegram group conversation threads ordered by most recent message from the account's isolated 7-day buffer (requires group threading enabled via setTelegramGroupThreading).

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
chatIdstring
Optional Telegram group ID (e.g. '-1001234567890') to filter threads to a single group
limitinteger
Maximum number of reconstructed group threads to return ordered by most recent message (default: 30, max: 100)
messagesPerThreadinteger
Maximum number of recent messages to include per thread (default: 20, max: 50)
querystring
Optional case-insensitive filter matched against group name, chat ID, thread ID, author, or message text
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"chatId": "-1001234567890",
"limit": 20,
"messagesPerThread": 15,
"token": "your-secret-token"
}
Response
{
"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"
}
]
}
]
}

getTelegramThread

POSThttps://api.supergreen.cc/getTelegramThread

Retrieve a single reconstructed Telegram group conversation thread and its messages by threadId.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
threadIdstringrequired
Reconstructed Telegram group thread ID (from webhook threadId / thread.id, listTelegramThreads, or the Thread Viewer)
chatIdstring
Optional Telegram group ID to scope the lookup; omit to retrieve by threadId alone
countinteger
Maximum number of messages to return in the thread (default: 50, max: 200)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"threadId": "7b2a9d20-5e7c-4d34-9b14-75a45f03e3a1",
"count": 50,
"token": "your-secret-token"
}
Response
{
"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
}
]
}
}

getTelegramGroups

POSThttps://api.supergreen.cc/getTelegramGroups

Retrieve a list of Telegram groups and channels with admin status.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"token": "your-secret-token"
}
Response
{
"success": true,
"warning": "",
"cacheMaxAgeSeconds": 0,
"groups": [
{
"id": "-1001234567890",
"name": "My Telegram Group",
"isAdmin": true
}
]
}

joinTelegramGroup

POSThttps://api.supergreen.cc/joinTelegramGroup

Join a Telegram group or channel by username or invite link.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
groupUsernamestringrequired
Group/channel @username, t.me link, or private invite link (https://t.me/+...)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"groupUsername": "https://t.me/+AbCdEf123456",
"token": "your-secret-token"
}
Response
{
"success": true,
"status": "joined",
"chatId": "-1001234567890"
}

getTelegramGroupMembers

POSThttps://api.supergreen.cc/getTelegramGroupMembers

Get members of a Telegram group or supergroup along with their admin status.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
groupIdstringrequired
Telegram group ID or @username
limitinteger
Maximum number of members to return (default: 200, max: 500)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"groupId": "-1001234567890",
"limit": 100,
"token": "your-secret-token"
}
Response
{
"success": true,
"members": [
{
"id": "987654321",
"name": "Alice Cohen",
"pushname": "alice",
"isAdmin": true,
"isSuperAdmin": true
}
]
}

addUserToTelegramGroup

POSThttps://api.supergreen.cc/addUserToTelegramGroup

Add a user to a Telegram group where you have permission.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
groupIdstringrequired
Telegram group ID or @username
userIdstringrequired
User ID or @username to add
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"groupId": "-1001234567890",
"userId": "@alice",
"token": "your-secret-token"
}
Response
{
"success": true
}

removeUserFromTelegramGroup

POSThttps://api.supergreen.cc/removeUserFromTelegramGroup

Remove a user from a Telegram group where you are an admin.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
groupIdstringrequired
Telegram group ID or @username
userIdstringrequired
User ID or @username to remove
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"groupId": "-1001234567890",
"userId": "@alice",
"token": "your-secret-token"
}
Response
{
"success": true
}

blockTelegramContact

POSThttps://api.supergreen.cc/blockTelegramContact

Block a Telegram user.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
contactIdstringrequired
User ID or @username to block
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"contactId": "@spammer",
"token": "your-secret-token"
}
Response
{
"success": true
}

unblockTelegramContact

POSThttps://api.supergreen.cc/unblockTelegramContact

Unblock a previously blocked Telegram user.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
contactIdstringrequired
User ID or @username to unblock
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"contactId": "@spammer",
"token": "your-secret-token"
}
Response
{
"success": true
}

setTelegramWebhook

POSThttps://api.supergreen.cc/setTelegramWebhook

Set or update the webhook URL for a Telegram account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
urlstringnullrequired
Webhook URL to receive updates, or null to remove webhook
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/telegram-webhook",
"token": "your-secret-token"
}
Response
{
"success": true
}

addTelegramWebhook

POSThttps://api.supergreen.cc/addTelegramWebhook

Add an additional webhook URL for a Telegram account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
urlstringrequired
Webhook URL to add
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/telegram-webhook",
"token": "your-secret-token"
}
Response
{
"success": true
}

removeTelegramWebhook

POSThttps://api.supergreen.cc/removeTelegramWebhook

Remove a webhook URL from a Telegram account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
urlstringrequired
Webhook URL to remove
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/telegram-webhook",
"token": "your-secret-token"
}
Response
{
"success": true
}

testTelegramWebhook

POSThttps://api.supergreen.cc/testTelegramWebhook

Send a signed test Telegram webhook event to verify your endpoint receives and verifies Supergreen payloads.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
urlstringrequired
Webhook URL to send a signed test event to
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/telegram-webhook",
"token": "your-secret-token"
}
Response
{
"success": true,
"status": 200
}

changeTelegramAccountName

POSThttps://api.supergreen.cc/changeTelegramAccountName

Change the display name of your Telegram account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
namestringrequired
New display name for your Telegram account
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"name": "Supergreen Support",
"token": "your-secret-token"
}
Response
{
"success": true
}

changeTelegramAccountBio

POSThttps://api.supergreen.cc/changeTelegramAccountBio

Change the bio/about text of your Telegram account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
biostringrequired
New bio/about text for your Telegram account
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"bio": "Automated assistant powered by Supergreen",
"token": "your-secret-token"
}
Response
{
"success": true
}

changeTelegramAccountAvatar

POSThttps://api.supergreen.cc/changeTelegramAccountAvatar

Change the profile photo of your Telegram account.

Authentication: Required - Include token in request body
Request body
phoneNumberstringrequired
Your Telegram account phone number
imageBase64stringrequired
Base64-encoded JPEG/PNG image (with or without data URI prefix)
tokenstringrequired
Your account's secret authentication token
Example
Request
{
"phoneNumber": "15551234567",
"imageBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRg==",
"token": "your-secret-token"
}
Response
{
"success": true
}

addAccountAdmin

POSThttps://api.supergreen.cc/addAccountAdmin

Share 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.

Authentication: Required - Include refreshToken in request body (injected automatically by call_supergreen_user_api)
Request body
refreshTokenstringrequired
Dashboard session token (injected automatically by call_supergreen_user_api)
accountIdstringrequired
Account UUID (or normalized phone number for WhatsApp, Telegram, or SMS phone lines)
emailstringrequired
Email address of the teammate to add as co-admin (must have logged in at https://supergreen.cc at least once first)
accountTypestring
Account entity type: 'whatsapp' (default), 'telegram', 'facebook', 'instagram', 'reddit', 'linkedin', or 'phone'
Example
Request
{
"refreshToken": "your-session-refresh-token",
"accountId": "142ed1c4-bc61-4a65-acab-3d7e69b3292d",
"email": "teammate@example.com",
"accountType": "whatsapp"
}
Response
{
"success": true
}

removeAccountAdmin

POSThttps://api.supergreen.cc/removeAccountAdmin

Remove a co-admin from a shared line/account. Neither the billing owner (billingUser) nor the last remaining admin can be removed.

Authentication: Required - Include refreshToken in request body (injected automatically by call_supergreen_user_api)
Request body
refreshTokenstringrequired
Dashboard session token (injected automatically by call_supergreen_user_api)
accountIdstringrequired
Account UUID (or normalized phone number for WhatsApp, Telegram, or SMS phone lines)
adminIdstring
Optional user ID of the co-admin to remove (provide adminId or email)
emailstring
Email address of the co-admin to remove
accountTypestring
Account entity type: 'whatsapp' (default), 'telegram', 'facebook', 'instagram', 'reddit', 'linkedin', or 'phone'
Example
Request
{
"refreshToken": "your-session-refresh-token",
"accountId": "142ed1c4-bc61-4a65-acab-3d7e69b3292d",
"email": "teammate@example.com",
"accountType": "whatsapp"
}
Response
{
"success": true
}

addFbGroup

POSThttps://api.supergreen.cc/addFbGroup

Authentication: Required - Include refreshToken in request body (injected automatically by call_supergreen_user_api)
Request body
refreshTokenstringrequired
fbAccountIdstringrequired
groupIdstringrequired
namestring
Example
Request
{
"refreshToken": "your-user-session-token",
"fbAccountId": "fb-account-12345",
"groupId": "123456789",
"name": "Tech Enthusiasts"
}
Response
{
"success": true
}

removeFbGroup

POSThttps://api.supergreen.cc/removeFbGroup

Authentication: Required - Include refreshToken in request body (injected automatically by call_supergreen_user_api)
Request body
refreshTokenstringrequired
fbGroupIdstringrequired
Example
Request
{
"refreshToken": "your-user-session-token",
"fbGroupId": "fb-group-12345"
}
Response
{
"success": true
}

commentOnFbPost

POSThttps://api.supergreen.cc/commentOnFbPost

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
fbAccountIdstring
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
groupIdstringrequired
postIdstringrequired
textstringrequired
Example
Request
{
"token": "your-secret-token",
"fbAccountId": "fb-account-12345",
"groupId": "123456789",
"postId": "987654321",
"text": "Great post!"
}
Response
{
"success": true
}

postToFbGroup

POSThttps://api.supergreen.cc/postToFbGroup

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
fbAccountIdstring
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
groupIdstringrequired
Facebook Group ID or URL
poststring
Post text content
textstring
Post text content alias
asyncboolean
If true, returns an operationId immediately and processes in background
Example
Request
{
"token": "your-secret-token",
"groupId": "123456789",
"post": "Hello Facebook group! This is an automated post."
}
Response
{
"success": true
}

getFbGroups

POSThttps://api.supergreen.cc/getFbGroups

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
fbAccountIdstring
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
refreshboolean
If true, scrapes joined groups live from Facebook
asyncboolean
If true, runs live refresh in background and returns an operationId immediately
Example
Request
{
"token": "your-secret-token",
"refresh": false
}
Response
{
"success": true,
"groups": [
{
"id": "fb-group-1",
"groupId": "123456789",
"name": "Tech Enthusiasts",
"lastScrapedAt": 1700000000000
}
]
}

getFbOperation

POSThttps://api.supergreen.cc/getFbOperation

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
operationIdstringrequired
Operation ID returned from an async request
Example
Request
{
"token": "your-secret-token",
"operationId": "op_fb_123456789"
}
Response
{
"success": true,
"operationId": "op_fb_123456789",
"status": "completed",
"result": {
"success": true
}
}

sendFbDirectMessage

POSThttps://api.supergreen.cc/sendFbDirectMessage

Send a direct message on Facebook Messenger using the connected Facebook account.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
fbAccountIdstring
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
recipientUserIdstringrequired
Numeric Facebook user/thread ID or Messenger thread URL (e.g. '100012345678901' or 'https://www.facebook.com/messages/t/100012345678901/')
textstringrequired
The text message to send
asyncboolean
If true, returns an operationId immediately and sends in background (poll with getFbOperation)
Example
Request
{
"token": "your-secret-token",
"recipientUserId": "100012345678901",
"text": "Hello from Supergreen!"
}
Response
{
"success": true
}

getFbDirectMessages

POSThttps://api.supergreen.cc/getFbDirectMessages

Read recent Facebook Messenger inbox conversations, or read messages from a specific Messenger thread/user.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
fbAccountIdstring
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
conversationIdstring
Numeric Facebook Messenger thread/user ID or Messenger thread URL (e.g. '100012345678901' or 'https://www.facebook.com/messages/t/100012345678901/'). Omit to list recent inbox conversations.
recipientUserIdstring
Alias for conversationId (numeric Facebook user/thread ID or Messenger URL).
limitnumber
Maximum number of messages or inbox conversations to fetch (default: 20, max: 50)
asyncboolean
If true, runs in background and returns an operationId immediately (poll with getFbOperation)
Example
Request
{
"token": "your-secret-token",
"conversationId": "100012345678901",
"limit": 20
}
Response
{
"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
}
]
}

scanFbMarketplace

POSThttps://api.supergreen.cc/scanFbMarketplace

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Facebook account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires fbAccountId
fbAccountIdstring
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
querystringrequired
minPricenumber
maxPricenumber
limitnumber
maxScrollsnumber
Example
Request
{
"token": "your-secret-token",
"query": "laptops",
"minPrice": 300,
"maxPrice": 1500
}
Response
{
"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/..."
}
]
}

addLinkedInConnection

POSThttps://api.supergreen.cc/addLinkedInConnection

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the LinkedIn account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires linkedInAccountId
linkedInAccountIdstring
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
profileUrlstringrequired
LinkedIn profile URL or vanity username (e.g. 'https://www.linkedin.com/in/satyanadella' or 'satyanadella')
messagestring
Optional personalized invitation note (up to 300 characters)
Example
Request
{
"token": "your-secret-token",
"profileUrl": "https://www.linkedin.com/in/satyanadella",
"message": "Hi Satya, I would love to connect!"
}
Response
{
"success": true,
"status": "invitation_sent",
"connected": false
}

searchLinkedInPeople

POSThttps://api.supergreen.cc/searchLinkedInPeople

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the LinkedIn account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires linkedInAccountId
linkedInAccountIdstring
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
querystringrequired
Search query keywords
limitnumber
Maximum results (default 10)
pagenumber
Search page number (default 1)
Example
Request
{
"token": "your-secret-token",
"query": "software engineer google",
"limit": 10
}
Response
{
"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"
}
]
}

sendLinkedInMessage

POSThttps://api.supergreen.cc/sendLinkedInMessage

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the LinkedIn account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires linkedInAccountId
linkedInAccountIdstring
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
profileUrlstring
LinkedIn profile URL or vanity username to message
conversationIdstring
LinkedIn conversation / thread ID
textstringrequired
The text message to send
Example
Request
{
"token": "your-secret-token",
"profileUrl": "https://www.linkedin.com/in/janedoe",
"text": "Hi Jane, great connecting with you!"
}
Response
{
"success": true,
"sent": true
}

getLinkedInMessages

POSThttps://api.supergreen.cc/getLinkedInMessages

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the LinkedIn account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires linkedInAccountId
linkedInAccountIdstring
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
conversationIdstring
Conversation / thread ID. If omitted and profileUrl is omitted, returns inbox conversations list
profileUrlstring
Profile URL or username to get messages with
limitnumber
Maximum number of messages or conversations to fetch
Example
Request
{
"token": "your-secret-token",
"limit": 20
}
Response
{
"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
}
]
}

getLinkedInProfile

POSThttps://api.supergreen.cc/getLinkedInProfile

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the LinkedIn account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires linkedInAccountId
linkedInAccountIdstring
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
profileUrlstringrequired
LinkedIn profile URL or vanity username
Example
Request
{
"token": "your-secret-token",
"profileUrl": "https://www.linkedin.com/in/satyanadella"
}
Response
{
"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"
}
}

createLinkedInPost

POSThttps://api.supergreen.cc/createLinkedInPost

Create and publish a new post on your LinkedIn feed.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the LinkedIn account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires linkedInAccountId
linkedInAccountIdstring
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
textstringrequired
The text content of the LinkedIn post
visibilitystring
Optional post visibility: 'ANYONE' (public) or 'CONNECTIONS_ONLY' (1st-degree connections only). Defaults to the account's current LinkedIn setting
Example
Request
{
"token": "your-secret-token",
"text": "Excited to share our latest product update!",
"visibility": "ANYONE"
}
Response
{
"success": true,
"posted": true,
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7123456789012345678/"
}

sendInstagramDirectMessage

POSThttps://api.supergreen.cc/sendInstagramDirectMessage

Send a direct message on Instagram to a username or existing DM thread.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Instagram account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires instagramAccountId
instagramAccountIdstring
Instagram Account ID. Optional when using token (the token already identifies the account). Never an email address
usernamestring
Recipient Instagram username or profile URL (e.g. 'natgeo', '@natgeo', or 'https://www.instagram.com/natgeo/')
threadIdstring
Instagram DM thread ID or Direct URL (e.g. '340282366841710300949128123456789012345' or 'https://www.instagram.com/direct/t/340282366841710300949128123456789012345/')
conversationIdstring
Alias for threadId
textstringrequired
The text message to send
Example
Request
{
"token": "your-secret-token",
"username": "natgeo",
"text": "Hello from Supergreen!"
}
Response
{
"success": true,
"sent": true,
"threadId": "340282366841710300949128123456789012345"
}

getInstagramDirectMessages

POSThttps://api.supergreen.cc/getInstagramDirectMessages

List recent Instagram DM inbox conversations, or read messages from a specific DM thread or user.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Instagram account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires instagramAccountId
instagramAccountIdstring
Instagram Account ID. Optional when using token (the token already identifies the account). Never an email address
threadIdstring
Instagram DM thread ID or Direct URL. Omit along with username to list recent inbox conversations.
conversationIdstring
Alias for threadId
usernamestring
Instagram username or profile URL to read DM history with.
limitinteger
Maximum number of conversations or messages to return (default: 20, max: 50)
Example
Request
{
"token": "your-secret-token",
"limit": 20
}
Response
{
"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
}
]
}

createInstagramPost

POSThttps://api.supergreen.cc/createInstagramPost

Publish a new photo or video post to your Instagram feed.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Instagram account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires instagramAccountId
instagramAccountIdstring
Instagram Account ID. Optional when using token (the token already identifies the account). Never an email address
mediaUrlstring
Public HTTP/HTTPS URL of the image (JPEG/PNG/WebP) or video (MP4/MOV) to publish
mediaBase64string
Base64-encoded image or video data (with or without data: URL prefix)
mimeTypestring
Optional media MIME type (e.g. 'image/jpeg', 'image/png', 'video/mp4'). Auto-detected when omitted.
filenamestring
Optional filename for the media upload (e.g. 'photo.jpg')
captionstring
Optional caption text for the Instagram feed post
Example
Request
{
"token": "your-secret-token",
"mediaUrl": "https://example.com/photo.jpg",
"caption": "Behind the scenes at Supergreen!"
}
Response
{
"success": true,
"posted": true,
"postUrl": "https://www.instagram.com/p/Cx123456789/"
}

createInstagramStory

POSThttps://api.supergreen.cc/createInstagramStory

Publish a photo to your Instagram Story.

Authentication: Required - Include token in request body
Request body
tokenstring
Secret API token of the Instagram account; identifies the account on its own
refreshTokenstring
Dashboard session token; requires instagramAccountId
instagramAccountIdstring
Instagram Account ID. Optional when using token (the token already identifies the account). Never an email address
mediaUrlstring
Public HTTP/HTTPS URL of the image (JPEG/PNG/WebP) to publish as an Instagram Story
mediaBase64string
Base64-encoded image data (with or without data: URL prefix)
mimeTypestring
Optional image MIME type (e.g. 'image/jpeg', 'image/png', 'image/webp'). Auto-detected when omitted.
filenamestring
Optional filename for the story upload (e.g. 'story.jpg')
Example
Request
{
"token": "your-secret-token",
"mediaUrl": "https://example.com/story.jpg"
}
Response
{
"success": true,
"posted": true
}

Error Handling

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"
}