API לתזכורות
ממשק API לרשימת תזכורות
קבלו את התזכורות בסביבת העבודה שלכם, 50 בכל פעם, מהחדשה לישנה. השתמשו בו כדי למצוא מזהי תזכורות, לבקר את האוטומציות שלכם או לגבות אותן.
https://wbiztool.com/api/v1/reminder/list/גוף הבקשה: JSON או שדות טופס
ה-endpoint הזה מקבל רק POST. בקשת GET, גם עם query string, מחזירה HTTP 400 עם Invalid JSON format: Expecting value….
הרשימה כוללת תזכורות פעילות ומושהות מכל סביבת העבודה, בין אם נוצרו דרך ה-API ובין אם בדף Reminders (תזכורות). תזכורות שבוטלו לא כלולות.
דוגמה מהירה#
curl -X POST https://wbiztool.com/api/v1/reminder/list/ \
-H "Content-Type: application/json" \
-d '{
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"page": 1
}'import requests
response = requests.post(
"https://wbiztool.com/api/v1/reminder/list/",
json={"client_id": 12345, "api_key": "YOUR_API_KEY", "page": 1},
timeout=60,
)
try:
result = response.json() # read the body even when the HTTP code is 400
except ValueError:
raise SystemExit(f"HTTP {response.status_code}: not JSON. Check that your api_key exists.")
if result["status"] == 1:
print(f"{result['total']} reminders in total")
for reminder in result["reminders"]:
print(reminder["id"], reminder["name"], reminder["cron_expression"], reminder["is_active"])
else:
print("Failed:", result["message"])// Node.js 18+ (built-in fetch). Save as .mjs to use top-level await.
const response = await fetch("https://wbiztool.com/api/v1/reminder/list/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ client_id: 12345, api_key: "YOUR_API_KEY", page: 1 }),
});
// Read the body even when the HTTP code is 400. A non-JSON reply means the api_key wasn't found.
const text = await response.text();
let result;
try {
result = JSON.parse(text);
} catch {
throw new Error(`HTTP ${response.status}: not JSON. Check that your api_key exists.`);
}
if (result.status === 1) {
console.log(`${result.total} reminders in total`);
for (const reminder of result.reminders) {
console.log(reminder.id, reminder.name, reminder.cron_expression, reminder.is_active);
}
} else {
console.error("Failed:", result.message);
}<?php
$ch = curl_init('https://wbiztool.com/api/v1/reminder/list/');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 12345,
'api_key' => 'YOUR_API_KEY',
'page' => 1,
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
]);
$result = json_decode(curl_exec($ch), true);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($result === null) {
echo "HTTP $httpCode: not JSON. Check that your api_key exists.";
} elseif ($result['status'] === 1) {
foreach ($result['reminders'] as $reminder) {
echo $reminder['id'] . ' ' . $reminder['name'] . ' ' . $reminder['cron_expression'] . "\n";
}
} else {
echo 'Failed: ' . $result['message'];
}החליפו את 12345 ו-YOUR_API_KEY בערכים שלכם. בסעיף אימות מוסבר איפה למצוא אותם.
פרמטרי הבקשה#
client_idintegerחובהמזהה הלקוח שלכם ל-API (API Client ID) מהדף Settings → API keys.
api_keystringחובהמפתח ה-API שלכם מאותו דף.
pageintegerאופציונלימספר הדף, החל מ-
1(ברירת מחדל). כל דף מכיל 50 תזכורות, ואי אפשר לשנות את גודל הדף. ערך שאינו מספר שלם של 1 ומעלה מטופל כ-1.
תגובה#
בקשה מוצלחת מחזירה HTTP 200:
{
"reminders": [
{
"id": 3187,
"name": "Monthly rent reminder",
"to_number": "919876543210",
"message_template": "Hi Aman, a reminder that your rent is due on {current_date_formatted}.",
"msg_type": 0,
"msg_type_display": "Text",
"img_url": "",
"file_name": "",
"cron_expression": "0 10 1 * *",
"next_run": "2026-10-01 10:00:00 UTC",
"is_active": true,
"whatsapp_client_id": 678,
"created_at": "2026-09-16 04:45:12"
}
],
"total": 1,
"page": 1,
"page_size": 50,
"message": "Success",
"status": 1
}
| שדה | סוג | תיאור |
|---|---|---|
status | integer | 1 בהצלחה, 0 אם הבקשה נכשלה. |
message | string | Success, אחרת השגיאה. |
reminders | array | התזכורות בדף הזה, מהחדשה לישנה. ריק אם הדף נמצא אחרי סוף הרשימה. |
total | integer | מספר התזכורות בסביבת העבודה, בכל הדפים. |
page | integer | הדף שהוחזר. |
page_size | integer | תמיד 50. |
שדות של תזכורת#
| שדה | סוג | תיאור |
|---|---|---|
id | integer | מזהה התזכורת. השתמשו בו עם ביטול תזכורת. |
name | string | שם התזכורת, או Unnamed Reminder אם אין לה שם. |
to_number | string | מספר הטלפון או שם הקבוצה שאליהם התזכורת נשלחת. |
message_template | string | ההודעה, כשמשתני התבנית עדיין לא מולאו. |
msg_type | integer | 0 טקסט, 1 תמונה, 2 קובץ. |
msg_type_display | string | Text, Image או File. |
img_url | string or null | כתובת ה-URL של התמונה בתזכורות עם תמונה, או כתובת ה-URL של הקובץ בתזכורות עם קובץ שנוצרו דרך ה-API. בתזכורות אחרות יכול להיות ריק או null. |
file_name | string or null | בתזכורות עם קובץ: כתובת ה-URL של הקובץ (בתזכורות שנוצרו בלוח הבקרה) או שם הקובץ (בתזכורות שנוצרו דרך ה-API, שכתובת ה-URL שלהן נמצאת ב-img_url). בתזכורות אחרות יכול להיות ריק או null. |
cron_expression | string | לוח הזמנים. ראו ביטויי cron. |
next_run | string | הפעם הבאה שבה לוח הזמנים מתאים, בפורמט YYYY-MM-DD HH:MM:SS UTC, או Invalid cron אם אי אפשר לקרוא את הביטוי. ראו את האזהרה שלמטה. |
is_active | boolean | true אם התזכורת פועלת, false אם היא מושהית. |
whatsapp_client_id | integer or null | מספר ה-WhatsApp שממנו היא נשלחת, או null אם היא משתמשת במספר המחובר הראשון. |
created_at | string | מתי התזכורת נוצרה, לפי UTC, בפורמט YYYY-MM-DD HH:MM:SS. |
שגיאות#
שגיאות מחזירות HTTP 400 עם status שמוגדר ל-0, אלא אם צוין אחרת:
{ "status": 0, "message": "Upgrade your plan to use reminders feature" }
| הודעה | איך לתקן |
|---|---|
Invalid JSON format: … | גוף ה-JSON לא תקין. תקבלו את השגיאה הזו גם בבקשת GET או בבקשת טופס בלי client_id. |
Auth Error - Please send correct API key and Client id | שלחו גם client_id וגם api_key. |
Invalid client id | שלחו את client_id כמספר. |
Auth Error: invalid api key | המפתח שייך ל-client_id אחר. |
Auth Error: please check client id | המפתח לא מקושר לסביבת עבודה. צרו מפתח חדש בסביבת העבודה שבה אתם רוצים להשתמש. |
Demo Account cannot access APIs | השתמשו בחשבון רגיל. |
Upgrade your plan to use reminders feature | החבילה שלכם לא כוללת תזכורות. שדרגו את החבילה. תזכורות קיימות ממשיכות לרוץ ולנצל קרדיטים אחרי שנמוך, ואי אפשר להציג, לבטל או להשהות אותן עד שתשדרגו. |
Error fetching reminders: … (HTTP 500) | משהו השתבש אצלנו. נסו שוב. |
אם ה-api_key לא קיים או נמחק, התגובה היא דף שגיאה ב-HTML עם HTTP 500 במקום JSON. בדקו את המפתח שלכם עם בדיקת פרטי התחברות.
קריאת כל הדפים#
המשיכו לבקש את הדף הבא עד שמתקבל דף עם פחות מ-50 תזכורות.
import requests
reminders, page = [], 1
while True:
response = requests.post(
"https://wbiztool.com/api/v1/reminder/list/",
json={"client_id": 12345, "api_key": "YOUR_API_KEY", "page": page},
timeout=60,
)
try:
result = response.json()
except ValueError:
raise SystemExit(f"HTTP {response.status_code}: not JSON. Check that your api_key exists.")
if result["status"] != 1:
raise RuntimeError(result["message"])
reminders += result["reminders"]
if len(result["reminders"]) < result["page_size"]:
break
page += 1
print(len(reminders), "reminders")// Node.js 18+ (built-in fetch). Save as .mjs to use top-level await.
const reminders = [];
let page = 1;
while (true) {
const response = await fetch("https://wbiztool.com/api/v1/reminder/list/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ client_id: 12345, api_key: "YOUR_API_KEY", page }),
});
const text = await response.text();
let result;
try {
result = JSON.parse(text);
} catch {
throw new Error(`HTTP ${response.status}: not JSON. Check that your api_key exists.`);
}
if (result.status !== 1) throw new Error(result.message);
reminders.push(...result.reminders);
if (result.reminders.length < result.page_size) break;
page += 1;
}
console.log(reminders.length, "reminders");טיפים#
- שמרו עותק משלכם של ה-
timezoneשל כל תזכורת כשאתם יוצרים אותה, כי ה-endpoint הזה לא מחזיר אותו. - מצאו תזכורות מושהות על ידי סינון לפי
is_activeשערכוfalse. חדשו אותן בדף Reminders. - נקו אוטומציות ישנות: קודם אספו מכל הדפים את המזהים שאתם רוצים לבטל, ואז קראו ל-ביטול תזכורת עבור כל אחד מהם. ביטול תוך כדי מעבר על הדפים מזיז תזכורות מאוחרות יותר לדפים מוקדמים יותר, כך שחלקן מדולגות.
