List Reminders API
End Point: https://wbiztool.com/api/v1/reminder/list/
Request Type: POST
Fields in Response
-
status (Integer)
- 1 for success, 0 for error -
message (String)
- Success or error message -
total (Integer)
- Total number of reminders -
page (Integer)
- Current page number -
page_size (Integer)
- Number of reminders per page (50) -
reminders (Array)
- Array of reminder objects
Reminder Object Fields
-
id (Integer)
- Unique reminder ID -
name (String)
- Reminder name -
to_number (String)
- Target phone number or group name -
message_template (String)
- Message content -
msg_type (Integer)
- Message type: 0=Text, 1=Image, 2=File -
msg_type_display (String)
- Human-readable message type -
img_url (String)
- Image URL (for image messages) -
file_name (String)
- File URL (for file messages) -
cron_expression (String)
- Cron scheduling pattern -
next_run (String)
- Next execution time in UTC -
is_active (Boolean)
- Whether reminder is active -
whatsapp_client_id (Integer)
- Associated WhatsApp client ID (if any) -
created_at (String)
- Creation timestamp
Example Request
{
"client_id": 12345,
"api_key": "your-api-key",
"page": 1
}
Example Response (Success)
{
"status": 1,
"message": "Success",
"total": 25,
"page": 1,
"page_size": 50,
"reminders": [
{
"id": 123,
"name": "Daily Follow-up",
"to_number": "919876543210",
"message_template": "Hi! This is your daily reminder to follow up with clients.",
"msg_type": 0,
"msg_type_display": "Text",
"img_url": "",
"file_name": "",
"cron_expression": "0 9 * * *",
"next_run": "2024-01-15 09:00:00 UTC",
"is_active": true,
"whatsapp_client_id": 456,
"created_at": "2024-01-14 10:30:00"
},
{
"id": 124,
"name": "Weekly Report",
"to_number": "Team Group",
"message_template": "Weekly sales report attached",
"msg_type": 1,
"msg_type_display": "Image",
"img_url": "https://example.com/weekly-report.jpg",
"file_name": "",
"cron_expression": "0 9 * * 1",
"next_run": "2024-01-22 09:00:00 UTC",
"is_active": true,
"whatsapp_client_id": null,
"created_at": "2024-01-14 11:15:00"
}
]
}
Example Response (Error)
{
"status": 0,
"message": "Auth Error: invalid api key"
}
cURL Example
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
}'
Python Example
import requests
import json
url = "https://wbiztool.com/api/v1/reminder/list/"
payload = {
"client_id": 12345,
"api_key": "your-api-key",
"page": 1
}
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
data = response.json()
print(f"Total reminders: {data['total']}")
for reminder in data['reminders']:
print(f"- {reminder['name']} (ID: {reminder['id']}) - Next: {reminder['next_run']}")
JavaScript/Node.js Example
const axios = require('axios');
const data = JSON.stringify({
"client_id": 12345,
"api_key": "your-api-key",
"page": 1
});
const config = {
method: 'post',
url: 'https://wbiztool.com/api/v1/reminder/list/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => {
const result = response.data;
console.log(`Total reminders: ${result.total}`);
result.reminders.forEach(reminder => {
console.log(`- ${reminder.name} (ID: ${reminder.id})`);
console.log(` Next run: ${reminder.next_run}`);
console.log(` Status: ${reminder.is_active ? 'Active' : 'Inactive'}`);
});
})
.catch(error => console.log(error));
Pagination Example
import requests
import json
def get_all_reminders(client_id, api_key):
url = "https://wbiztool.com/api/v1/reminder/list/"
headers = {'Content-Type': 'application/json'}
all_reminders = []
page = 1
while True:
payload = {
"client_id": client_id,
"api_key": api_key,
"page": page
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
data = response.json()
if data['status'] != 1:
break
all_reminders.extend(data['reminders'])
# Check if we've got all reminders
if len(data['reminders']) < data['page_size']:
break
page += 1
return all_reminders
# Usage
reminders = get_all_reminders(12345, "your-api-key")
print(f"Total reminders retrieved: {len(reminders)}")
Important Notes
- Returns only reminders belonging to your organization
- Results are ordered by creation date (newest first)
- Maximum 50 reminders per page for optimal performance
- Use pagination to retrieve all reminders if you have more than 50
- Both active and inactive reminders are included in the results
- Next run time is calculated in UTC timezone
- Deleted reminders are not included in the response
- Image and file URLs are included when applicable
Use Cases
Use Case | Description | Example |
---|---|---|
Audit & Management | Review all active reminders | Dashboard showing reminder status |
Backup & Export | Export reminder configurations | CSV export for backup purposes |
Integration | Sync with external systems | CRM integration with reminder data |
Analytics | Analyze reminder patterns | Report on reminder frequency and types |
Bulk Operations | Get reminder IDs for bulk actions | Mass update or deletion operations |