curl -X DELETE "https://api.hooked.so/v1/schedule/post_abc123xyz" \
-H "x-api-key: your_api_key_here"
import requests
schedule_id = 'post_abc123xyz'
response = requests.delete(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={'x-api-key': 'your_api_key_here'}
)
data = response.json()
if data['success']:
print('Schedule cancelled successfully')
else:
print('Failed:', data['message'])
$scheduleId = 'post_abc123xyz';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/schedule/{$scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) {
echo 'Schedule cancelled successfully';
} else {
echo 'Failed: ' . $data['message'];
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
scheduleId := "post_abc123xyz"
url := fmt.Sprintf("https://api.hooked.so/v1/schedule/%s", scheduleId)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("x-api-key", "your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"success": true,
"message": "Schedule cancelled successfully",
"data": {
"id": "post_abc123xyz",
"deleted": true
}
}
{
"code": "bad_request",
"message": "Cannot delete a published post",
"details": {}
}
{
"code": "not_found",
"message": "Schedule not found",
"details": {
"resource_id": "post_invalid",
"resource_type": "Schedule"
}
}
{
"code": "forbidden",
"message": "Schedule does not belong to your team",
"details": {}
}
Scheduling
Cancel Schedule
Cancel a scheduled post before it’s published
DELETE
/
v1
/
schedule
/
{scheduleId}
curl -X DELETE "https://api.hooked.so/v1/schedule/post_abc123xyz" \
-H "x-api-key: your_api_key_here"
import requests
schedule_id = 'post_abc123xyz'
response = requests.delete(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={'x-api-key': 'your_api_key_here'}
)
data = response.json()
if data['success']:
print('Schedule cancelled successfully')
else:
print('Failed:', data['message'])
$scheduleId = 'post_abc123xyz';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/schedule/{$scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) {
echo 'Schedule cancelled successfully';
} else {
echo 'Failed: ' . $data['message'];
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
scheduleId := "post_abc123xyz"
url := fmt.Sprintf("https://api.hooked.so/v1/schedule/%s", scheduleId)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("x-api-key", "your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"success": true,
"message": "Schedule cancelled successfully",
"data": {
"id": "post_abc123xyz",
"deleted": true
}
}
{
"code": "bad_request",
"message": "Cannot delete a published post",
"details": {}
}
{
"code": "not_found",
"message": "Schedule not found",
"details": {
"resource_id": "post_invalid",
"resource_type": "Schedule"
}
}
{
"code": "forbidden",
"message": "Schedule does not belong to your team",
"details": {}
}
Try it out! Use the API playground on the right to test the Cancel Schedule endpoint directly.
Overview
Cancel a scheduled post to prevent it from being published. This permanently removes the scheduled post from the queue.This action is permanent. Once cancelled, the scheduled post cannot be recovered. You’ll need to create a new schedule if you want to publish the video.
You can only cancel posts with
pending status. Posts that have already been published cannot be deleted through this API - you’ll need to delete them directly on the platform.Endpoint
DELETE /v1/schedule/{scheduleId}
Path Parameters
string
required
The unique ID of the scheduled post to cancel
Headers
string
required
Your API key from API Settings
Request Examples
const scheduleId = 'post_abc123xyz';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'DELETE',
headers: {
'x-api-key': process.env.HOOKED_API_KEY
}
});
const data = await response.json();
if (data.success) {
console.log('Schedule cancelled successfully');
} else {
console.error('Failed to cancel:', data.message);
}
Bulk Cancel Example
async function cancelMultipleSchedules(scheduleIds) {
const results = await Promise.allSettled(
scheduleIds.map(async (id) => {
const response = await fetch(`https://api.hooked.so/v1/schedule/${id}`, {
method: 'DELETE',
headers: { 'x-api-key': process.env.HOOKED_API_KEY }
});
return { id, result: await response.json() };
})
);
const cancelled = results
.filter(r => r.status === 'fulfilled' && r.value.result.success)
.map(r => r.value.id);
const failed = results
.filter(r => r.status === 'rejected' || !r.value.result.success)
.map(r => r.value?.id || 'unknown');
return { cancelled, failed };
}
// Usage
const { cancelled, failed } = await cancelMultipleSchedules([
'post_abc123',
'post_def456',
'post_ghi789'
]);
console.log(`Cancelled: ${cancelled.length}, Failed: ${failed.length}`);
curl -X DELETE "https://api.hooked.so/v1/schedule/post_abc123xyz" \
-H "x-api-key: your_api_key_here"
import requests
schedule_id = 'post_abc123xyz'
response = requests.delete(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={'x-api-key': 'your_api_key_here'}
)
data = response.json()
if data['success']:
print('Schedule cancelled successfully')
else:
print('Failed:', data['message'])
$scheduleId = 'post_abc123xyz';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/schedule/{$scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) {
echo 'Schedule cancelled successfully';
} else {
echo 'Failed: ' . $data['message'];
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
scheduleId := "post_abc123xyz"
url := fmt.Sprintf("https://api.hooked.so/v1/schedule/%s", scheduleId)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("x-api-key", "your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"message": "Schedule cancelled successfully",
"data": {
"id": "post_abc123xyz",
"deleted": true
}
}
{
"code": "bad_request",
"message": "Cannot delete a published post",
"details": {}
}
{
"code": "not_found",
"message": "Schedule not found",
"details": {
"resource_id": "post_invalid",
"resource_type": "Schedule"
}
}
{
"code": "forbidden",
"message": "Schedule does not belong to your team",
"details": {}
}
Important Notes
What Happens After Cancellation
- The scheduled post is permanently deleted
- The video itself is NOT deleted - only the schedule
- You can schedule the same video again with a new schedule
- Webhooks for this schedule will not be triggered
Published Posts
If a post has already been published (status: published), you cannot delete it through this API. To remove published content:
- YouTube: Go to YouTube Studio and delete the video
- TikTok: Open TikTok app and delete the post
- Instagram: Use Instagram app to delete the reel/post
Error Handling
| Error | Description | Solution |
|---|---|---|
Schedule not found | Invalid schedule ID | Check the schedule ID is correct |
Cannot delete a published post | Already published | Delete directly on the platform |
Schedule does not belong to your team | Wrong ownership | Use correct API key |
Next Steps
Create Schedule
Schedule a new video
List Scheduled
View all scheduled posts
List Videos
View all your videos
List Integrations
View connected platforms