curl -X PATCH "https://api.hooked.so/v1/schedule/post_abc123xyz" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"scheduledDateTime": "2024-03-20T16:00:00.000Z",
"platformData": {
"title": "Updated Title",
"description": "Updated description with more details"
}
}'
import requests
schedule_id = 'post_abc123xyz'
response = requests.patch(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'scheduledDateTime': '2024-03-20T16:00:00.000Z',
'platformData': {
'title': 'Updated Title',
'description': 'Updated description'
}
}
)
data = response.json()
print('Updated:', data['data'])
$scheduleId = 'post_abc123xyz';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/schedule/{$scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'scheduledDateTime' => '2024-03-20T16:00:00.000Z',
'platformData' => [
'title' => 'Updated Title'
]
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
{
"success": true,
"message": "Schedule updated successfully",
"data": {
"id": "post_abc123xyz",
"status": "pending",
"scheduledDateTime": "2024-03-20T16:00:00.000Z",
"platformData": {
"title": "Updated Title",
"description": "Updated description with more details",
"tags": ["productivity", "tips"],
"privacyStatus": "public"
}
}
}
{
"code": "bad_request",
"message": "Cannot update a published post",
"details": {}
}
{
"code": "bad_request",
"message": "Scheduled time must be in the future",
"details": {
"scheduledDateTime": "2024-03-01T14:00:00.000Z",
"currentTime": "2024-03-10T10:00:00.000Z"
}
}
{
"code": "not_found",
"message": "Schedule not found",
"details": {
"resource_id": "post_invalid",
"resource_type": "Schedule"
}
}
{
"code": "bad_request",
"message": "No fields to update",
"details": {}
}
Scheduling
Update Schedule
Update the scheduled time or platform data of a pending post
PATCH
/
v1
/
schedule
/
{scheduleId}
curl -X PATCH "https://api.hooked.so/v1/schedule/post_abc123xyz" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"scheduledDateTime": "2024-03-20T16:00:00.000Z",
"platformData": {
"title": "Updated Title",
"description": "Updated description with more details"
}
}'
import requests
schedule_id = 'post_abc123xyz'
response = requests.patch(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'scheduledDateTime': '2024-03-20T16:00:00.000Z',
'platformData': {
'title': 'Updated Title',
'description': 'Updated description'
}
}
)
data = response.json()
print('Updated:', data['data'])
$scheduleId = 'post_abc123xyz';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/schedule/{$scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'scheduledDateTime' => '2024-03-20T16:00:00.000Z',
'platformData' => [
'title' => 'Updated Title'
]
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
{
"success": true,
"message": "Schedule updated successfully",
"data": {
"id": "post_abc123xyz",
"status": "pending",
"scheduledDateTime": "2024-03-20T16:00:00.000Z",
"platformData": {
"title": "Updated Title",
"description": "Updated description with more details",
"tags": ["productivity", "tips"],
"privacyStatus": "public"
}
}
}
{
"code": "bad_request",
"message": "Cannot update a published post",
"details": {}
}
{
"code": "bad_request",
"message": "Scheduled time must be in the future",
"details": {
"scheduledDateTime": "2024-03-01T14:00:00.000Z",
"currentTime": "2024-03-10T10:00:00.000Z"
}
}
{
"code": "not_found",
"message": "Schedule not found",
"details": {
"resource_id": "post_invalid",
"resource_type": "Schedule"
}
}
{
"code": "bad_request",
"message": "No fields to update",
"details": {}
}
Try it out! Use the API playground on the right to test the Update Schedule endpoint directly.
Overview
Update a scheduled post to change its publishing time or platform metadata. This is useful for:- Rescheduling a post to a different time
- Updating the title, description, or tags before publishing
- Changing privacy settings
You can only update posts with
pending status. Published or failed posts cannot be modified.Endpoint
PATCH /v1/schedule/{scheduleId}
Path Parameters
string
required
The unique ID of the scheduled post to update
Headers
string
required
Your API key from API Settings
Request Body
string
New ISO 8601 datetime for publishing. Must be in the future.Example:
2024-03-20T16:00:00.000Zobject
Updated platform-specific metadata. Fields are merged with existing data.
Request Examples
Reschedule to Different Time
const scheduleId = 'post_abc123xyz';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'PATCH',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
scheduledDateTime: '2024-03-20T16:00:00.000Z'
})
});
const data = await response.json();
console.log('New scheduled time:', data.data.scheduledDateTime);
Update Platform Metadata
const scheduleId = 'post_abc123xyz';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'PATCH',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
platformData: {
title: 'Updated: 10 Amazing Productivity Tips',
description: 'I updated this video with even better tips!\n\nWatch to learn more...',
tags: ['productivity', 'tips', 'updated', '2024']
}
})
});
Update Both Time and Metadata
const scheduleId = 'post_abc123xyz';
const response = await fetch(`https://api.hooked.so/v1/schedule/${scheduleId}`, {
method: 'PATCH',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
scheduledDateTime: '2024-03-20T18:00:00.000Z',
platformData: {
title: 'Evening Edition: Productivity Tips',
privacyStatus: 'unlisted'
}
})
});
curl -X PATCH "https://api.hooked.so/v1/schedule/post_abc123xyz" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"scheduledDateTime": "2024-03-20T16:00:00.000Z",
"platformData": {
"title": "Updated Title",
"description": "Updated description with more details"
}
}'
import requests
schedule_id = 'post_abc123xyz'
response = requests.patch(
f'https://api.hooked.so/v1/schedule/{schedule_id}',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'scheduledDateTime': '2024-03-20T16:00:00.000Z',
'platformData': {
'title': 'Updated Title',
'description': 'Updated description'
}
}
)
data = response.json()
print('Updated:', data['data'])
$scheduleId = 'post_abc123xyz';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/schedule/{$scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'scheduledDateTime' => '2024-03-20T16:00:00.000Z',
'platformData' => [
'title' => 'Updated Title'
]
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Response
{
"success": true,
"message": "Schedule updated successfully",
"data": {
"id": "post_abc123xyz",
"status": "pending",
"scheduledDateTime": "2024-03-20T16:00:00.000Z",
"platformData": {
"title": "Updated Title",
"description": "Updated description with more details",
"tags": ["productivity", "tips"],
"privacyStatus": "public"
}
}
}
{
"code": "bad_request",
"message": "Cannot update a published post",
"details": {}
}
{
"code": "bad_request",
"message": "Scheduled time must be in the future",
"details": {
"scheduledDateTime": "2024-03-01T14:00:00.000Z",
"currentTime": "2024-03-10T10:00:00.000Z"
}
}
{
"code": "not_found",
"message": "Schedule not found",
"details": {
"resource_id": "post_invalid",
"resource_type": "Schedule"
}
}
{
"code": "bad_request",
"message": "No fields to update",
"details": {}
}
Important Notes
Metadata Merging: When updating
platformData, the new fields are merged with existing data. To remove a field, you need to set it explicitly to null or an empty value.Tags Replacement: The
tags array is replaced entirely, not merged. If you want to add a tag, include all existing tags plus the new one.Error Handling
| Error | Description | Solution |
|---|---|---|
Schedule not found | Invalid schedule ID | Use a valid schedule ID |
Cannot update a published post | Post already published | Cannot modify after publishing |
Scheduled time must be in the future | Time has passed | Use a future datetime |
No fields to update | Empty request body | Include at least one field to update |
Schedule does not belong to your team | Wrong team | Use correct API key |
Next Steps
Get Details
View full schedule information
Cancel Schedule
Cancel the scheduled post
List All
View all scheduled posts
Create New
Schedule another video
⌘I