logo
Schedulin Developers

For AI agents: a documentation index is available at /llms.txt. Every guide and example is also available as markdown by adding .md to its URL.

Update a post

Use PUT /v0/posts/{id} to change a post that hasn't published yet — for example to fix a caption or move its scheduled time.

curl -X PUT https://api.schedulin.app/v0/posts/post_789 \
  -H "x-api-key: $SCHEDULIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "Updated caption ✨",
    "scheduledAt": "2030-01-16T12:00:00Z"
  }'
import { SchedulinClient } from "@schedulin/sdk";

const client = new SchedulinClient({ apiKey: process.env.SCHEDULIN_API_KEY! });

await client.posts.update({
  id: "post_789",
  caption: "Updated caption ✨",
  scheduledAt: "2030-01-16T12:00:00Z",
});
import os
from datetime import datetime, timezone

from schedulin import Schedulin

client = Schedulin(api_key=os.environ["SCHEDULIN_API_KEY"])

client.posts.update(
    "post_789",
    caption="Updated caption ✨",
    scheduled_at=datetime(2030, 1, 16, 12, 0, tzinfo=timezone.utc),
)

What you can change

Only DRAFT and SCHEDULED posts can be updated. A post that is already published (COMPLETED) returns 409 Conflict; PROCESSING and FAILED posts are rejected too. Every field is optional; send only what changes.

FieldNotes
captionAt least 1 character, up to the platform's captionMaxLength from GET /v0/platforms
scheduledAtISO 8601. To schedule (status SCHEDULED, or a post that's already scheduled) it must be in the future — a past time returns 422. A draft may keep a past time. null clears it
statusOne of DRAFT (unschedule), SCHEDULED (publish at scheduledAt), or PROCESSING (publish now). COMPLETED and FAILED are set by Schedulin and are rejected (422)
mediaReplaces the post's media — see below
platformConfigurationPlatform-specific settings, as on create
tagIdsReplaces the post's tags — see below
WARNING
Setting to or publishes the post for real — the same as .

Media on update

media replaces the post's media. As on create, each item can be just a url — a media-library url (from GET /v0/media, an upload, or the post's own media array) or any public image/video URL, which is imported for you:

{
  "media": [
    { "url": "https://r2.schedulin.app/<your-org>/<id>-launch.jpg" },
    { "url": "https://www.schedulin.app/opengraph-image.png" }
  ]
}

Full media records (with id, name, mimeType, key) are accepted too, so you can send back the media array you got from GET /v0/posts/{id} unchanged.

Tags on update

tagIds replaces the post's tags, alone or together with other fields. To change only the tags you can also use PUT /v0/posts/{id}/tags (see Tag posts).

TIP
To publish a draft immediately (or schedule it), call — see .