Skip to main content
PATCH
/
v1
/
schedule
/
{scheduleId}
curl -X PATCH "https://api.hooked.ai/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"
    }
  }'
{
  "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"
    }
  }
}
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

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

Headers

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

Request Body

scheduledDateTime
string
New ISO 8601 datetime for publishing. Must be in the future.Example: 2024-03-20T16:00:00.000Z
platformData
object
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.ai/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.ai/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.ai/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.ai/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"
    }
  }'

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"
    }
  }
}

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

ErrorDescriptionSolution
Schedule not foundInvalid schedule IDUse a valid schedule ID
Cannot update a published postPost already publishedCannot modify after publishing
Scheduled time must be in the futureTime has passedUse a future datetime
No fields to updateEmpty request bodyInclude at least one field to update
Schedule does not belong to your teamWrong teamUse correct API key

Next Steps

Authorizations

x-api-key
string
header
required

Path Parameters

scheduleId
string
required

Schedule ID

Body

application/json
scheduledDateTime
string<date-time>

New ISO 8601 datetime for publishing

platformData
object

Response

200

Schedule updated successfully