Supergreen

API Documentation

Integrate Supergreen WhatsApp, Telegram, Facebook, and LinkedIn automation into your application using our HTTP API.

Getting Started

All API endpoints require authentication using your account's secret token. You can find this token in your WhatsApp, Telegram, Facebook, or LinkedIn account settings on the main dashboard.

Base URL: https://api.supergreen.cc

All endpoints accept JSON request bodies and return JSON responses. Make sure to set the Content-Type: application/json header.

n8n Automation (No-Code / Low-Code)

Automate WhatsApp and Telegram directly inside n8n without writing HTTP requests or managing headers. Supergreen is now verified on n8n Cloud:

n8n Cloud: Search Supergreen directly from the node picker canvas (+) and drag it into your workflow.
Self-hosted n8n: Go to Settings > Community Nodes > Install and enter n8n-nodes-supergreen.

n8n-nodes-supergreen

Supports sending text, binary media/PDFs, interactive polls, reactions, group management, and real-time webhook triggers for inbound messages.

Ready-to-Use n8n Workflows

Copy the JSON and press Ctrl+V (or Cmd+V) directly on your n8n canvas to import instantly:

View GitHub Repository & Sample Workflows →

Make.com (Integromat) Integration

Automate WhatsApp and Telegram workflows in Make.com using our ready-to-import scenario blueprints.

Download Ready Scenario Blueprints

How to Import into Make.com

  1. Create a new scenario in Make.com and click the ... (More) menu in the bottom toolbar.
  2. Select Import Blueprint and upload the downloaded .json file.
  3. In the HTTP module, update token and fromNumber with your credentials from the Supergreen dashboard.
  4. Copy the Custom Webhook URL from Make and add it to your Supergreen account under account settings or via the setWebhook endpoint.

Zapier Integration

Connect WhatsApp and Telegram to 6,000+ apps in Zapier using the built-in Webhooks by Zapier app.

1. Receive Messages in Zapier (Trigger)

  1. In Zapier, create a Zap and choose Webhooks by Zapier as the trigger.
  2. Select Catch Hook as the event and click Continue.
  3. Copy the generated Webhook URL (e.g. https://hooks.zapier.com/hooks/catch/...).
  4. Paste this URL into your account settings in the Supergreen dashboard (or use the setWebhook endpoint).
  5. Send a test message to your connected WhatsApp/Telegram number. Zapier will detect the payload with sender, text, and chat ID.

2. Send WhatsApp Messages from Zapier (Action)

  1. Add an action step and select Webhooks by Zapier > Custom Request.
  2. Set Method to POST and URL to https://api.supergreen.cc/.
  3. Under Headers, add Content-Type: application/json.
  4. In the Data field, paste the payload with your credentials and map the recipient number and message:
{
"endpoint": "sendMessage",
"payload": {
"token": "YOUR_SUPERGREEN_TOKEN",
"fromNumber": "YOUR_PHONE",
"toNumber": "15551234567@c.us",
"message": "Hello from Zapier!"
}
}

Node.js Quick Start

// Install the client (optional)
// npm install node-fetch
const fetch = require('node-fetch');
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: toNumber,
message: message,
linkPreview: false,
token: YOUR_TOKEN
}
})
});
return response.json();
}
// Example usage
sendMessage('15551234567@c.us', 'Hello from Node.js!')
.then(result => console.log('Message sent:', result))
.catch(err => console.error('Error:', err));

Webhook Events

When you configure a webhook URL, Supergreen will send POST requests to your server whenever WhatsApp or Telegram messages are received, or when Facebook group posts are scraped. The fromMe field (boolean) indicates whether the message was sent from the connected line itself (outgoing) or from another participant (incoming). The webhook payload follows this structure:

{
"network": "telegram",
"chat": {
"id": "-1001234567890",
"username": "example_channel",
"title": "Example Group"
},
"author": {
"id": "123456789",
"username": "johndoe"
},
"text": "Hello! This is a message from a user.",
"time": 1703251200000,
"fromMe": false
}

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:
fromNumber (string)*required
Your WhatsApp account phone number
toNumber (string)*required
Recipient's WhatsApp ID (e.g., '972501234567@c.us' for individuals or 'group-id@g.us' for groups)
message (string)*required
The text message to send
linkPreview (boolean)*required
Whether to show link previews for URLs in the message
quotedMessageId (string)
ID of a message to quote/reply to
token (string)*required
Your account's secret authentication token
Response:
messageId (string)
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:
fromNumber (string)*required
Your WhatsApp account phone number
toNumber (string)*required
Recipient's WhatsApp ID
base64 (string)*required
Base64 encoded media data (with or without data URL prefix)
type (string)*required
Media type: 'image', 'video', 'document', or 'audio'
mimeType (string)
Media MIME type (e.g., 'image/jpeg', 'video/mp4', 'application/pdf'). Auto-detected from data URL if not provided
filename (string)
Filename for the media. Auto-generated from MIME type if not provided
caption (string)
Optional caption text for the media
token (string)*required
Your account's secret authentication token
Response:
messageId (string)
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"
}

sendPoll

POSThttps://api.supergreen.cc/sendPoll

Send a poll to a WhatsApp group.

Authentication: Required - Include token in request body
Request Body:
fromNumber (string)*required
Your WhatsApp account phone number
toNumber (string)*required
Group ID to send the poll to (e.g., '120363123456789012@g.us')
name (string)*required
The poll question/title
choices (array)*required
Array of poll options (minimum 2)
selectableCount (number)
How many options a voter may select (default: 1)
token (string)*required
Your account's secret authentication token
Response:
messageId (string)
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"
}

editMessage

POSThttps://api.supergreen.cc/editMessage

Edit a previously sent message.

Authentication: Required - Include token in request body
Request Body:
fromNumber (string)*required
Your WhatsApp account phone number
messageId (string)*required
ID of the message to edit (returned from sendMessage)
newText (string)*required
The new text for the message
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
chatId (string)*required
Chat ID (e.g. 972501234567@c.us for 1:1 or groupId@g.us for group)
messageId (string)*required
ID of the message to delete
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
messageId (string)*required
ID of the message to react to
reaction (string)*required
Reaction emoji to send
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
chatId (string)*required
Chat ID where typing indicator should appear
durationMs (number)
Duration in milliseconds (optional, defaults to standard duration)
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
chatId (string)*required
Chat ID where typing indicator should stop
token (string)*required
Your account's secret authentication token
Example:
Request:
{
"fromNumber": "15551234567",
"chatId": "15559876543@c.us",
"token": "your-secret-token"
}
Response:
{
"success": true
}

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:
fromNumber (string)*required
Your WhatsApp account phone number
useCache (boolean)
Whether to use cached group metadata (defaults to true). Set to false for a fresh fetch.
token (string)*required
Your account's secret authentication token
Response:
warning (string)
cacheMaxAgeSeconds (number)
groups (array)
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:
groupId (string)*required
Group ID (e.g., '120363123456789012@g.us')
userId (string)*required
User ID to add (e.g., '972509876543@c.us')
fromNumber (string)*required
Your WhatsApp account phone number
token (string)*required
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:
groupId (string)*required
Group ID (e.g., '120363123456789012@g.us')
userId (string)*required
User ID to remove (e.g., '972509876543@c.us')
fromNumber (string)*required
Your WhatsApp account phone number
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
userId (string)*required
User ID to check common groups with
token (string)*required
Your account's secret authentication token
Response:
groups (array)
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:
fromNumber (string)*required
Your WhatsApp account phone number
groupId (string)*required
Group ID to check for join requests
token (string)*required
Your account's secret authentication token
Response:
requests (array)
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:
fromNumber (string)*required
Your WhatsApp account phone number
groupId (string)*required
Group ID where requests should be approved
requesterIds (array | null)
Array of requester IDs to approve, or null to approve all
token (string)*required
Your account's secret authentication token
Response:
results (array)
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:
fromNumber (string)*required
Your WhatsApp account phone number
groupId (string)*required
Group ID where requests should be rejected
requesterIds (array)*required
Array of requester IDs to reject
token (string)*required
Your account's secret authentication token
Response:
results (array)
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:
fromNumber (string)*required
Your WhatsApp account phone number
groupId (string)*required
Group ID (e.g., '120363123456789012@g.us')
token (string)*required
Your account's secret authentication token
Response:
members (array)
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:
fromNumber (string)*required
Your WhatsApp account phone number
groupLink (string)*required
WhatsApp group invite link (e.g., 'https://chat.whatsapp.com/AbCdEfGhIjK')
token (string)*required
Your account's secret authentication token
Response:
id (string)
subject (string)
desc (string)
size (number)
owner (string)
isInGroup (boolean)
announce (boolean)
restrict (boolean)
creation (number)
suspended (boolean)
participants (array)
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:
fromNumber (string)*required
Your WhatsApp account phone number
contactId (string)*required
Contact ID to block (e.g., '972509876543@c.us')
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
contactId (string)*required
Contact ID to report as spam (e.g., '972509876543@c.us')
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
contactId (string)*required
Contact ID to unblock (e.g., '972509876543@c.us')
token (string)*required
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:
fromNumber (string)*required
Your WhatsApp account phone number
lid (string)*required
LID to resolve (e.g., '119846817792023@lid')
token (string)*required
Your account's secret authentication token
Response:
number (string | null)
Example:
Request:
{
"fromNumber": "15551234567",
"lid": "119846817792023@lid",
"token": "your-secret-token"
}
Response:
{
"number": "15559876543@c.us"
}

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:
phoneNumber (string)*required
Your WhatsApp account phone number
url (string | null)*required
Webhook URL to receive updates, or null to remove webhook
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
url (string)*required
Webhook URL to add
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
url (string)*required
Webhook URL to remove
token (string)*required
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:
number (string)*required
Your WhatsApp account phone number
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
preferCodeLogin (boolean)*required
Set to true for pairing code login, false for QR code login
token (string)*required
Your account's secret authentication token
Example:
Request:
{
"phoneNumber": "15551234567",
"preferCodeLogin": 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:
phoneNumber (string)*required
Your WhatsApp account phone number
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
name (string)*required
The new display name for your WhatsApp account
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
imageBase64 (string)*required
Base64-encoded JPEG image. Can optionally include data URI prefix (data:image/jpeg;base64,...)
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
bio (string)*required
The new bio/about text for your account
token (string)*required
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:
phoneNumber (string)*required
Your WhatsApp account phone number
category (string)*required
The privacy category to update ('about' or 'profilePic')
value (string)*required
Who can see this information ('all' for Everyone, 'contacts' for My Contacts, 'none' for Nobody)
token (string)*required
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 token in request body
Request Body:
refreshToken (string)*required
phoneNumber (string)*required
code (string)*required
Example:
Request:
{
"phoneNumber": "15551234567",
"code": "12345",
"token": "your-secret-token"
}
Response:
{
"success": true
}

sendTelegramMessage

POSThttps://api.supergreen.cc/sendTelegramMessage

Send a text message via Telegram.

Authentication: Required - Include token in request body
Request Body:
phoneNumber (string)*required
Your Telegram account phone number
chatId (string)*required
Chat ID or username to send to
text (string)*required
Message text
token (string)*required
Your account's secret authentication token
Response:
messageId (string)
Example:
Request:
{
"phoneNumber": "15551234567",
"chatId": "@example_channel",
"text": "Hello from Supergreen Telegram!",
"token": "your-secret-token"
}
Response:
{
"success": true,
"messageId": "12345"
}

getTelegramGroups

POSThttps://api.supergreen.cc/getTelegramGroups

Retrieve a list of Telegram groups and channels.

Authentication: Required - Include token in request body
Request Body:
phoneNumber (string)*required
Your Telegram account phone number
token (string)*required
Your account's secret authentication token
Response:
warning (string)
cacheMaxAgeSeconds (number)
groups (array)
Example:
Request:
{
"phoneNumber": "15551234567",
"token": "your-secret-token"
}
Response:
{
"success": true,
"warning": "Group list is computed live and may be incomplete for large accounts.",
"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.

Authentication: Required - Include token in request body
Request Body:
phoneNumber (string)*required
Your Telegram account phone number
groupUsername (string)*required
Group/channel username to join
token (string)*required
Your account's secret authentication token
Response:
status (string)
chatId (string)
Example:
Request:
{
"phoneNumber": "15551234567",
"groupUsername": "example_channel",
"token": "your-secret-token"
}
Response:
{
"success": true,
"status": "joined",
"chatId": "example_channel"
}

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:
phoneNumber (string)*required
Your Telegram account phone number
url (string | null)*required
Webhook URL to receive updates, or null to remove webhook
token (string)*required
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:
phoneNumber (string)*required
Your Telegram account phone number
url (string)*required
Webhook URL to add
token (string)*required
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:
phoneNumber (string)*required
Your Telegram account phone number
url (string)*required
Webhook URL to remove
token (string)*required
Your account's secret authentication token
Example:
Request:
{
"phoneNumber": "15551234567",
"url": "https://your-server.com/telegram-webhook",
"token": "your-secret-token"
}
Response:
{
"success": true
}

addFbGroup

POSThttps://api.supergreen.cc/addFbGroup

Authentication: Required - Include token in request body
Request Body:
refreshToken (string)*required
fbAccountId (string)*required
groupId (string)*required
name (string)
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 token in request body
Request Body:
refreshToken (string)*required
fbGroupId (string)*required
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:
token (string)
Secret API token of the Facebook account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires fbAccountId
fbAccountId (string)
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
groupId (string)*required
postId (string)*required
text (string)*required
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:
token (string)
Secret API token of the Facebook account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires fbAccountId
fbAccountId (string)
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
groupId (string)*required
Facebook Group ID or URL
post (string)
Post text content
text (string)
Post text content alias
async (boolean)
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:
token (string)
Secret API token of the Facebook account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires fbAccountId
fbAccountId (string)
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
refresh (boolean)
If true, scrapes joined groups live from Facebook
async (boolean)
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:
token (string)
Secret API token of the Facebook account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires fbAccountId
operationId (string)*required
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

Authentication: Required - Include token in request body
Request Body:
token (string)
Secret API token of the Facebook account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires fbAccountId
fbAccountId (string)
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
recipientUserId (string)*required
text (string)*required
Example:
Request:
{
"token": "your-secret-token",
"recipientUserId": "100012345678901",
"text": "Hello from Supergreen!"
}
Response:
{
"success": true
}

scanFbMarketplace

POSThttps://api.supergreen.cc/scanFbMarketplace

Authentication: Required - Include token in request body
Request Body:
token (string)
Secret API token of the Facebook account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires fbAccountId
fbAccountId (string)
Facebook Account ID. Optional when using token (the token already identifies the account). Never an email address
query (string)*required
minPrice (number)
maxPrice (number)
limit (number)
maxScrolls (number)
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:
token (string)
Secret API token of the LinkedIn account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires linkedInAccountId
linkedInAccountId (string)
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
profileUrl (string)*required
LinkedIn profile URL or vanity username (e.g. 'https://www.linkedin.com/in/satyanadella' or 'satyanadella')
message (string)
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:
token (string)
Secret API token of the LinkedIn account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires linkedInAccountId
linkedInAccountId (string)
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
query (string)*required
Search query keywords
limit (number)
Maximum results (default 10)
page (number)
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:
token (string)
Secret API token of the LinkedIn account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires linkedInAccountId
linkedInAccountId (string)
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
profileUrl (string)
LinkedIn profile URL or vanity username to message
conversationId (string)
LinkedIn conversation / thread ID
text (string)*required
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:
token (string)
Secret API token of the LinkedIn account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires linkedInAccountId
linkedInAccountId (string)
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
conversationId (string)
Conversation / thread ID. If omitted and profileUrl is omitted, returns inbox conversations list
profileUrl (string)
Profile URL or username to get messages with
limit (number)
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:
token (string)
Secret API token of the LinkedIn account; identifies the account on its own
refreshToken (string)
Dashboard session token; requires linkedInAccountId
linkedInAccountId (string)
LinkedIn Account ID. Optional when using token (the token already identifies the account). Never an email address
profileUrl (string)*required
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"
}
}

Error Handling

All API endpoints return standard HTTP status codes. Successful requests return 200 OK. Errors return appropriate status codes with JSON error details:

{
"error": "Authentication failed",
"message": "Invalid token provided"
}

Common error codes:

  • 400 - Bad Request (invalid parameters)
  • 401 - Unauthorized (invalid token)
  • 404 - Not Found (endpoint doesn't exist)
  • 500 - Internal Server Error