Skip to main content
DELETE
/
v1
/
schedule
/
{scheduleId}
curl -X DELETE "https://api.hooked.ai/v1/schedule/post_abc123xyz" \
  -H "x-api-key: your_api_key_here"
{
  "success": true,
  "message": "Schedule cancelled successfully",
  "data": {
    "id": "post_abc123xyz",
    "deleted": true
  }
}
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

scheduleId
string
required
The unique ID of the scheduled post to cancel

Headers

x-api-key
string
required
Your API key from API Settings

Request Examples

const scheduleId = 'post_abc123xyz';

const response = await fetch(`https://api.hooked.ai/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.ai/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.ai/v1/schedule/post_abc123xyz" \
  -H "x-api-key: your_api_key_here"

Response

{
  "success": true,
  "message": "Schedule cancelled successfully",
  "data": {
    "id": "post_abc123xyz",
    "deleted": true
  }
}

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:
  1. YouTube: Go to YouTube Studio and delete the video
  2. TikTok: Open TikTok app and delete the post
  3. Instagram: Use Instagram app to delete the reel/post

Error Handling

ErrorDescriptionSolution
Schedule not foundInvalid schedule IDCheck the schedule ID is correct
Cannot delete a published postAlready publishedDelete directly on the platform
Schedule does not belong to your teamWrong ownershipUse correct API key

Next Steps

Authorizations

x-api-key
string
header
required

Path Parameters

scheduleId
string
required

Schedule ID

Response

200

Schedule cancelled successfully