Skip to content
postpeg

Scheduling API

A social media scheduling API with the queue built in

Add one field to a post and postpeg holds it until then, publishes it on every network you named, and retries the ones that stumble. No cron jobs, no queue of your own, and the same request works on all ten networks.

Scheduling is one field

Pass scheduled_at to POST /v1/posts as ISO 8601 with a time-zone offset, up to a year ahead. 2026-10-01T09:00:00Z and 2026-10-01T11:00:00+02:00 are the same moment, so you can send your user’s local time as it is. A time in the past publishes straight away.

The post comes back as scheduled, with each target pending. The post is checked against every network’s rules when you create it, not when it goes out, so a post that won’t fit is refused now, while your user is still there to fix it.

Check, list and cancel

GET /v1/posts?status=scheduled lists what’s waiting, newest first, with a cursor for the next page. DELETE /v1/posts/{id} cancels every target that hasn’t started publishing and returns the post; if nothing is left to cancel you get a 409.

There’s no edit call: to change a scheduled post, cancel it and create it again. With an Idempotency-Key per version (your own record’s id plus a revision works well) a retried request never double-books a slot.

What happens at publish time

Scheduled posts go out within a minute of their time. Each target moves from pending to queued, publishing and published, with the live url and platform_post_id set. Videos can stay publishing while the network processes them.

A temporary failure puts the target back to pending for a retry, up to 5 attempts with growing waits, with the last failure in error and the count in attempts. If a login expired in the months since you scheduled, the account turns reconnect_required and the target fails with that reason.

Scheduling for your own users

If your product schedules posts for its customers, give each one a profile with your own id in external_id, and connect their accounts to it. Every scheduled post, status and retry then belongs to that profile’s accounts, and one API key runs them all. See Profiles and accounts.

Example: schedule a post for 09:00

curl https://api.postpeg.com/v1/posts \
  -H "Authorization: Bearer $POSTPEG_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: changelog-2026-10-01" \
  -d '{
    "account_ids": [
      "acc_mfz1x0k27d4q8vbn3c5s0a1p9e",
      "acc_mfz1y4r9h2c6t0wqk8e3m7ld5f",
      "acc_mfz20b5n1s8f4j7xv2p9r6hu1c"
    ],
    "content": "Scheduled posts now retry on their own when a network has a bad minute. Changelog: https://example.com/changelog #buildinpublic",
    "media": [
      {
        "url": "https://example.com/changelog.png",
        "type": "image"
      }
    ],
    "scheduled_at": "2026-10-01T09:00:00Z"
  }'
Response · 201 Created
{
  "id": "post_mfz2k3v8q1w5e9r4t7y0u2i6o3",
  "content": "Scheduled posts now retry on their own when a network has a bad minute. Changelog: https://example.com/changelog #buildinpublic",
  "media": [
    {
      "url": "https://example.com/changelog.png",
      "type": "image"
    }
  ],
  "platform_options": {},
  "status": "scheduled",
  "scheduled_at": "2026-10-01T09:00:00.000Z",
  "targets": [
    {
      "account_id": "acc_mfz1x0k27d4q8vbn3c5s0a1p9e",
      "platform": "x",
      "status": "pending",
      "platform_post_id": null,
      "url": null,
      "error": null,
      "attempts": 0,
      "published_at": null
    },
    {
      "account_id": "acc_mfz1y4r9h2c6t0wqk8e3m7ld5f",
      "platform": "linkedin",
      "status": "pending",
      "platform_post_id": null,
      "url": null,
      "error": null,
      "attempts": 0,
      "published_at": null
    },
    {
      "account_id": "acc_mfz20b5n1s8f4j7xv2p9r6hu1c",
      "platform": "instagram",
      "status": "pending",
      "platform_post_id": null,
      "url": null,
      "error": null,
      "attempts": 0,
      "published_at": null
    }
  ],
  "created_at": "2026-09-24T14:02:11.418Z"
}

Questions

How far ahead can I schedule?
Up to a year. A scheduled_at further out is refused with a 400, and a time in the past publishes straight away.
Which networks support scheduling?
All ten: X, Instagram, Facebook, LinkedIn, TikTok, YouTube, Threads, Pinterest, Bluesky and Google Business.
How do I handle time zones?
Send scheduled_at with an offset, like 2026-10-01T11:00:00+02:00. postpeg stores the moment and returns it in UTC.
Can I change a scheduled post?
Cancel it with DELETE /v1/posts/{id} and create the new version. Targets that already started publishing are left as they are.

The rest of the API

Send your first post in a few minutes

The 7-day trial has every feature and 3 connected accounts, with no card. The quickstart takes you from a key to a published post.