curl -X DELETE "https://api.hooked.so/v1/schedule/cm6f7g8h9i0j1k2l3m4n5o6p7" \
-H "x-api-key: your_api_key_here"
const scheduleId = 'cm6f7g8h9i0j1k2l3m4n5o6p7';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'DELETE',
headers: { 'x-api-key': process.env.HOOKED_API_KEY }
});
const result = await response.json();
console.log(result.message);
import requests
schedule_id = 'cm6f7g8h9i0j1k2l3m4n5o6p7'
response = requests.delete(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={'x-api-key': 'your_api_key_here'}
)
print(response.json()['data']['deleted'])
{
"success": true,
"message": "Schedule cancelled successfully",
"data": {
"id": "cm6f7g8h9i0j1k2l3m4n5o6p7",
"deleted": true
}
}
{
"code": "bad_request",
"message": "Cannot delete a published post",
"errorCode": "INVALID_INPUT",
"details": {}
}
{
"code": "not_found",
"message": "Schedule not found",
"errorCode": "RESOURCE_NOT_FOUND",
"details": { "resource_id": "cm6f7g8h9i0j1k2l3m4n5o6p7", "resource_type": "Schedule" }
}
Publish
Cancel Scheduled Post
Cancel a scheduled post before it is published
DELETE
/
v1
/
schedule
/
{scheduleId}
curl -X DELETE "https://api.hooked.so/v1/schedule/cm6f7g8h9i0j1k2l3m4n5o6p7" \
-H "x-api-key: your_api_key_here"
const scheduleId = 'cm6f7g8h9i0j1k2l3m4n5o6p7';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'DELETE',
headers: { 'x-api-key': process.env.HOOKED_API_KEY }
});
const result = await response.json();
console.log(result.message);
import requests
schedule_id = 'cm6f7g8h9i0j1k2l3m4n5o6p7'
response = requests.delete(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={'x-api-key': 'your_api_key_here'}
)
print(response.json()['data']['deleted'])
{
"success": true,
"message": "Schedule cancelled successfully",
"data": {
"id": "cm6f7g8h9i0j1k2l3m4n5o6p7",
"deleted": true
}
}
{
"code": "bad_request",
"message": "Cannot delete a published post",
"errorCode": "INVALID_INPUT",
"details": {}
}
{
"code": "not_found",
"message": "Schedule not found",
"errorCode": "RESOURCE_NOT_FOUND",
"details": { "resource_id": "cm6f7g8h9i0j1k2l3m4n5o6p7", "resource_type": "Schedule" }
}
Overview
Cancels a scheduled post: the pending publish is removed and the post is deleted. The video itself is not touched. A post that was already published cannot be cancelled here (remove it on the platform instead). Afailed post can be deleted.
After this call the id answers 404.
curl -X DELETE "https://api.hooked.so/v1/schedule/cm6f7g8h9i0j1k2l3m4n5o6p7" \
-H "x-api-key: your_api_key_here"
const scheduleId = 'cm6f7g8h9i0j1k2l3m4n5o6p7';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'DELETE',
headers: { 'x-api-key': process.env.HOOKED_API_KEY }
});
const result = await response.json();
console.log(result.message);
import requests
schedule_id = 'cm6f7g8h9i0j1k2l3m4n5o6p7'
response = requests.delete(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={'x-api-key': 'your_api_key_here'}
)
print(response.json()['data']['deleted'])
{
"success": true,
"message": "Schedule cancelled successfully",
"data": {
"id": "cm6f7g8h9i0j1k2l3m4n5o6p7",
"deleted": true
}
}
{
"code": "bad_request",
"message": "Cannot delete a published post",
"errorCode": "INVALID_INPUT",
"details": {}
}
{
"code": "not_found",
"message": "Schedule not found",
"errorCode": "RESOURCE_NOT_FOUND",
"details": { "resource_id": "cm6f7g8h9i0j1k2l3m4n5o6p7", "resource_type": "Schedule" }
}
Errors
| Status | When |
|---|---|
| 400 | The post was already published (Cannot delete a published post) |
| 401 | Missing or invalid API key (code: "not_authenticated") |
| 403 | Your team does not have the Hooked app product (code: "entitlement_required") |
| 404 | No scheduled post with that id, including one already cancelled (code: "not_found"). A post published directly (not scheduled) answers the same way, and so does an id that belongs to another team |
| 500 | { "success": false, "message": "Failed to cancel schedule", "error": "..." } |