WhatsTask Direct
Notifications API
Send Telegram notifications from your app with a single API call. No authentication tokens. No webhooks to configure. Just POST and go.
One Endpoint
Single POST request
No Auth Needed
Just your Telegram ID
HTML Support
Rich text formatting
API Endpoint
POST https://pm.whatstask.com/api/notifications/sendGet started in 2 steps
Send your first notification in under a minute.
Get your Telegram ID
/start7955910963)Send a notification
Make a POST request with your Telegram ID and message.
curl -X POST "https://pm.whatstask.com/api/notifications/send" \
-H "Content-Type: application/json" \
-d '{
"telegramId": "YOUR_TELEGRAM_ID",
"message": "<b>Hello!</b>\n\nThis is my first notification.",
"type": "general"
}'Done!
You'll receive the notification in Telegram instantly.
Endpoint
/api/notifications/sendBase URL: https://pm.whatstask.com
Request body
| Field | Required | Description |
|---|---|---|
telegramId | Yes | Your Telegram ID (from @whatstask_bot) |
message | Yes | Notification text (supports HTML) |
type | No | Notification type (default: general) |
Response
Success (200)
{
"success": true
}Error (400/500)
{
"error": "telegramId and message required"
}In your language
Copy-paste examples for popular languages.
curl -X POST "https://pm.whatstask.com/api/notifications/send" \
-H "Content-Type: application/json" \
-d '{
"telegramId": "YOUR_TELEGRAM_ID",
"message": "<b>Alert</b>\n\nSomething happened!",
"type": "general"
}'Supported tags
Messages support Telegram HTML formatting for rich text.
| Tag | Result |
|---|---|
<b>text</b> | bold |
<i>text</i> | italic |
<code>text</code> | monospace |
<pre>text</pre> | code block |
<a href="url">text</a> | link |
\n | newline |
Example with formatting:
{
"telegramId": "7955910963",
"message": "<b>🛒 New Order</b>\n\nOrder #12345\nCustomer: John Doe\nTotal: <b>$99.00</b>\n\n<a href=\"https://example.com\">View Order</a>",
"type": "general"
}Example templates
Ready-to-use message templates for common scenarios.
E-commerce Order
New order notifications
const message = `<b>🛒 New Order</b>
Order #${orderId}
Customer: ${customerName}
Total: <b>$${total}</b>
<a href="https://dashboard.example.com/orders/${orderId}">View Order</a>`Server Monitoring
System alerts
const message = `<b>⚠️ Server Alert</b>
Server: ${serverName}
Issue: ${alertType}
Time: ${timestamp}
CPU: ${cpuUsage}%
Memory: ${memUsage}%`Form Submission
Contact form alerts
const message = `<b>📬 New Contact</b>
From: ${name}
Email: ${email}
<i>"${messageText.slice(0, 200)}"</i>`Deployment Status
CI/CD notifications
const message = `<b>🚀 Deployment ${status}</b>
Project: ${projectName}
Branch: ${branch}
Commit: <code>${commitHash.slice(0, 7)}</code>
${status === 'success' ? '✅ Live now' : '❌ Check logs'}`Notify your team
Store Telegram IDs and call the endpoint for each recipient.
Environment variable:
WHATSTASK_TELEGRAM_ID=7955910963Notify multiple team members:
const TEAM_IDS = ['111111111', '222222222', '333333333']
async function notifyTeam(message) {
await Promise.all(
TEAM_IDS.map(id =>
fetch('https://pm.whatstask.com/api/notifications/send', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ telegramId: id, message, type: 'general' })
})
)
)
}
// Usage
await notifyTeam('<b>Team Alert</b>\n\nNew deployment ready for review')Response codes
| Status | Meaning |
|---|---|
200 | Notification sent successfully |
400 | Missing required fields (telegramId or message) |
500 | Bot not configured or Telegram API error |
telegramId and message requiredFix: Ensure both fields are included in your request body.
Bot not configuredFix: The notification service is not available. Contact support.
Telegram API errorFix: Check that your Telegram ID is correct and you've started @whatstask_bot.
ENDPOINT:
POST https://pm.whatstask.com/api/notifications/send
PAYLOAD:
{
"telegramId": "YOUR_ID", // Required
"message": "Your text", // Required (HTML supported)
"type": "general" // Optional
}
SETUP:
1. Message @whatstask_bot on Telegram
2. Send /start to get your Telegram ID
3. Use that ID in your API calls
HTML TAGS:
<b>bold</b> <i>italic</i> <code>mono</code>
<a href="url">link</a> \n for newlines
Ready to send notifications?
Get your Telegram ID and start sending notifications in under a minute.