Cancel a scheduled message
Cancel a scheduled message so it isn't sent. For a recurring series, no more sends go out; the ones already sent aren't affected.
Cancelling can't be undone. A cancelled message no longer appears in List scheduled messages, and any later call with its uuid returns 404.
Endpointโ
DELETE https://api.p.2chat.io/open/whatsapp/scheduled-messages/{uuid}
Authenticationโ
Include your API key in the X-User-API-Key header. Learn more about authentication.
API costโ
1API credit
Each call to this endpoint deducts 1 API credit from your plan's API credit pool.
Parametersโ
| Field | In | Required | Description |
|---|---|---|---|
uuid | path | Yes | The uuid of the scheduled message, as returned when it was scheduled or by List scheduled messages (e.g. EST6cc93513-1706-4ffc-a69e-174572d860dd). |
Invocationโ
- cURL
- Python
- JavaScript
- PHP
curl --location --request DELETE 'https://api.p.2chat.io/open/whatsapp/scheduled-messages/EST6cc93513-1706-4ffc-a69e-174572d860dd' \
--header 'X-User-API-Key: your_api_key_here'
import requests
uuid = "EST6cc93513-1706-4ffc-a69e-174572d860dd"
url = f"https://api.p.2chat.io/open/whatsapp/scheduled-messages/{uuid}"
headers = {
"X-User-API-Key": "your_api_key_here"
}
response = requests.delete(url, headers=headers)
print(response.json())
const axios = require('axios');
const uuid = 'EST6cc93513-1706-4ffc-a69e-174572d860dd';
const response = await axios.delete(`https://api.p.2chat.io/open/whatsapp/scheduled-messages/${uuid}`, {
headers: {
'X-User-API-Key': 'your_api_key_here'
}
});
console.log(response.data);
<?php
$uuid = 'EST6cc93513-1706-4ffc-a69e-174572d860dd';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.p.2chat.io/open/whatsapp/scheduled-messages/{$uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'X-User-API-Key: your_api_key_here'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Responseโ
Success (HTTP 200)โ
The cancelled message, with cancelled: true. It keeps the status it had when you cancelled it. The other fields are described in The scheduled message object.
{
"data": {
"uuid": "EST6cc93513-1706-4ffc-a69e-174572d860dd",
"status": "pending",
"cancelled": true,
"next_send_at_utc": "2026-12-01 14:30:00",
"timezone": "America/New_York",
"channel_uuid": "WPNb932ad7f-250a-4ada-86a6-c1691e00a2cb",
"to_number": "+447700900461",
"text": "Hi! Just a reminder that your appointment is tomorrow at 10:00.",
"url": null,
"template": null,
"recurring": false,
"repeat": null,
"ends": null,
"sent_count": "0",
"created_at": "2026-11-20 15:04:12"
},
"success": true
}
| Field | Description |
|---|---|
success | true when the message was cancelled |
data | The cancelled message |
Errorโ
{
"error": true,
"error_message": "Resource Not Found: Scheduled message not found"
}
| Field | Description |
|---|---|
error | true when the request failed |
error_message | A description of what went wrong |
An HTTP 404 with Resource Not Found: Scheduled message not found means the uuid doesn't exist on your account or the message was already cancelled.