Supergreen

API Documentation

Integrate Supergreen WhatsApp and Telegram automation into your application using our HTTP API. Facebook accounts are managed from the dashboard and deliver scraped group posts to configured webhooks.

Getting Started

All API endpoints require authentication using your account's secret token. You can find this token in your WhatsApp, Telegram, or Facebook 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.

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('972501234567@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 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
}

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": "972501234567",
"toNumber": "972509876543@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', or 'document'
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": "972501234567",
"toNumber": "972509876543@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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"chatId": "972501234567@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": "972501234567",
"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": "972501234567",
"chatId": "972509876543@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": "972501234567",
"chatId": "972509876543@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": "972501234567",
"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": "972501234567",
"groupId": "120363123456789012@g.us",
"userId": "972509876543@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": "972501234567",
"userId": "972509876543@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": "972501234567",
"groupId": "120363123456789012@g.us",
"token": "your-secret-token"
}
Response:
{
"requests": [
{
"requesterId": "972509876543@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": "972501234567",
"groupId": "120363123456789012@g.us",
"requesterIds": [
"972509876543@c.us"
],
"token": "your-secret-token"
}
Response:
{
"results": [
{
"requesterId": "972509876543@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": "972501234567",
"groupId": "120363123456789012@g.us",
"requesterIds": [
"972509876543@c.us"
],
"token": "your-secret-token"
}
Response:
{
"results": [
{
"requesterId": "972509876543@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": "972501234567",
"groupId": "120363123456789012@g.us",
"token": "your-secret-token"
}
Response:
{
"members": [
{
"id": "972509876543@c.us",
"isAdmin": true,
"isSuperAdmin": true
},
{
"id": "972501111111@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": "972501234567",
"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": "972509876543@c.us",
"isAdmin": true,
"isSuperAdmin": false
}
]
}

getGroupInviteLink

POSThttps://api.supergreen.cc/getGroupInviteLink

Get the invite link for a WhatsApp group.

Authentication: Required - Include token in request body
Request Body:
fromNumber (string)*required
Your WhatsApp account phone number
groupId (string)*required
Group ID to get the invite link for
token (string)*required
Your account's secret authentication token
Response:
inviteLink (string | null)
Example:
Request:
{
"fromNumber": "972501234567",
"groupId": "120363123456789012@g.us",
"token": "your-secret-token"
}
Response:
{
"inviteLink": null
}

joinGroupByInviteLink

POSThttps://api.supergreen.cc/joinGroupByInviteLink

Join a WhatsApp group using its invite link.

Authentication: Required - Include token in request body
Request Body:
fromNumber (string)*required
Your WhatsApp account phone number
groupLink (string)*required
WhatsApp group invite link to join
token (string)*required
Your account's secret authentication token
Response:
status (string)
chatId (string)
Example:
Request:
{
"fromNumber": "972501234567",
"groupLink": "https://chat.whatsapp.com/AbCdEfGhIjK",
"token": "your-secret-token"
}
Response:
{
"status": "joined",
"chatId": "120363123456789012@g.us"
}

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": "972501234567",
"contactId": "972509876543@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": "972501234567",
"contactId": "972509876543@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": "972501234567",
"lid": "119846817792023@lid",
"token": "your-secret-token"
}
Response:
{
"number": "972509876543@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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"bio": "Powered by Supergreen",
"token": "your-secret-token"
}
Response:
{}

submitTelegramCode

POSThttps://api.supergreen.cc/submitTelegramCode

Submit the login code to complete Telegram authentication.

Authentication: Required - Include token in request body
Request Body:
phoneNumber (string)*required
Your Telegram account phone number
code (string)*required
Login code received in Telegram
token (string)*required
Your account's secret authentication token
Example:
Request:
{
"phoneNumber": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"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": "972501234567",
"url": "https://your-server.com/telegram-webhook",
"token": "your-secret-token"
}
Response:
{
"success": true
}

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