リマインダーAPI
リマインダーのキャンセルAPI
繰り返しのリマインダーを停止し、二度と実行されないようにします。お客様の支払いが完了したとき、サブスクリプションが終了したとき、自動化が不要になったときなどに利用できます。
POST
https://wbiztool.com/api/v1/reminder/cancel/リクエストボディ: JSONまたはフォームフィールド
リマインダーの作成で返されたreminder_idが必要です。手元にない場合は、リマインダー一覧で確認してください。
クイック例#
curl -X POST https://wbiztool.com/api/v1/reminder/cancel/ \
-H "Content-Type: application/json" \
-d '{
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"reminder_id": "3187"
}'import requests
reminder_id = 3187
response = requests.post(
"https://wbiztool.com/api/v1/reminder/cancel/",
json={
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"reminder_id": str(reminder_id), # must be a string in JSON
},
timeout=60,
)
try:
result = response.json() # read the body even when the HTTP code is 400 or 404
except ValueError:
raise SystemExit(f"HTTP {response.status_code}: not JSON. Check that your api_key exists.")
if result["status"] == 1:
print("Reminder cancelled")
else:
print("Failed:", result["message"])// Node.js 18+ (built-in fetch). Save as .mjs to use top-level await.
const reminderId = 3187;
const response = await fetch("https://wbiztool.com/api/v1/reminder/cancel/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: 12345,
api_key: "YOUR_API_KEY",
reminder_id: String(reminderId), // must be a string in JSON
}),
});
// Read the body even when the HTTP code is 400 or 404. A non-JSON reply means the request crashed.
const text = await response.text();
let result;
try {
result = JSON.parse(text);
} catch {
throw new Error(`HTTP ${response.status}: not JSON. Check your api_key and send reminder_id as a string.`);
}
if (result.status === 1) {
console.log("Reminder cancelled");
} else {
console.error("Failed:", result.message);
}<?php
$payload = [
'client_id' => 12345,
'api_key' => 'YOUR_API_KEY',
'reminder_id' => (string) 3187, // must be a string in JSON
];
$ch = curl_init('https://wbiztool.com/api/v1/reminder/cancel/');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
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 your api_key and send reminder_id as a string.";
} elseif ($result['status'] === 1) {
echo 'Reminder cancelled';
} else {
echo 'Failed: ' . $result['message'];
}12345とYOUR_API_KEYはご自身の値に置き換えてください。値の確認場所は認証をご覧ください。
リクエストパラメータ#
client_idinteger必須設定 → APIキーに表示されるAPIクライアントIDです。
api_keystring必須同じページにあるAPIキーです。
フォームフィールドの値はすべて文字列になるため、フォームフィールドで送信するとこの問題を回避できます。
curl -X POST https://wbiztool.com/api/v1/reminder/cancel/ \
-d client_id=12345 \
-d api_key=YOUR_API_KEY \
-d reminder_id=3187
レスポンス#
リクエストが成功すると、HTTP 200が返ります。
{
"message": "Reminder cancelled successfully",
"status": 1
}
| フィールド | 型 | 説明 |
|---|---|---|
status | integer | リマインダーがキャンセルされた場合は1、リクエストが失敗した場合は0。 |
message | string | Reminder cancelled successfully、それ以外はエラー内容。 |
エラー#
特に記載がない限り、エラーはHTTP 400で返り、statusは0になります。
{ "status": 0, "message": "Reminder not found" }
| メッセージ | 対処方法 |
|---|---|
Invalid JSON format: … | JSONボディが無効です。client_idなしのフォームリクエストや、すべてのGETリクエストでもこのエラーになります。 |
Reminder ID cannot be null | reminder_idを追加してください。 |
Auth Error - Please send correct API key and Client id | client_idとapi_keyの両方を送信してください。 |
Invalid client id | client_idを数値で送信してください。 |
Invalid reminder id | reminder_idは3187のような整数である必要があります。 |
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 | ご利用のプランにはリマインダーが含まれていません。以前に作成したリマインダーは引き続き実行されてクレジットを消費しますが、アップグレードするまで、APIでもダッシュボードでもキャンセルや一時停止はできません。 |
Reminder not found(HTTP 404) | IDが存在しない、別のワークスペースにある、またはリマインダーがすでにキャンセルされています。 |
Error cancelling reminder: …(HTTP 500) | サーバー側で問題が発生しました。もう一度お試しください。 |
api_keyが存在しないか削除されている場合、レスポンスはJSONではなく、HTTP 500のHTMLエラーページになります。認証情報の確認でキーをテストしてください。
キャンセルするとどうなるか#
- リマインダーはすぐに停止し、二度と実行されません。一時停止中のリマインダーもキャンセルできます。
- リマインダー一覧とリマインダーページから表示されなくなります。
- キャンセルしたリマインダーは元に戻せません。再開するには、新しいリマインダーを作成してください。
- キャンセル前にリマインダーがすでにキューに登録したメッセージは削除されず、送信される可能性があります。
ヒント#
- 2回キャンセルすると
Reminder not foundが返ります。リクエストを再試行する場合は、このメッセージを「キャンセル済み」として扱ってください。 - 一時停止はAPIでは利用できません。リマインダーを一時的に止めるには、代わりにリマインダーページで一時停止してください。
- スケジュールの変更:更新用のAPIはありません。リマインダーをキャンセルし、新しい
cron_expressionで新しいリマインダーを作成してください。
