Postpone Logo
Scheduling Posts

Next Scheduled Dates

Query the next available posting slot from each social account's schedule.

The nextScheduleDates query returns the next available slot from each social account's Account Schedule — the time Postpone would use if you scheduled a new post to that account right now. This is the same suggestion the app uses to pre-fill the date and time on the Schedule Post page, so it's useful for automations that want to place a post at the account's next open slot.

It is not a lookup of when your already-scheduled posts go out — it looks forward for the next free slot, taking your existing scheduled posts into account.

If all you want is to place a post at the next open slot, you don't need this query: pass schedulingMode: QUEUE_NEXT to the scheduling mutation instead. It picks and takes the slot in a single request. Use nextScheduleDates when you want to show the upcoming slot — to pre-fill a date picker, say — rather than post to it.

What You Get Back

scheduleDate is the earliest upcoming slot in the account's schedule that isn't already taken by a scheduled post. A slot is considered taken when a scheduled post falls on it or within about 30 minutes of it, so the returned time is always clear of your existing posts.

scheduleDate is null only when the account has no usable schedule — no slots, or no timezone set. A schedule with slots always returns a date: the search runs as far ahead as your queue requires, so an account booked solid for months returns the first slot past the end of the queue rather than nothing.

Reddit accounts are supported and return a scheduleDate like any other account. A Reddit schedule belongs to the account rather than to any one subreddit, so a slot counts as taken when any submission from that account falls near it, whichever subreddit it goes to — a post going out to several subreddits doesn't take one slot per subreddit. It does take more than one when its submissions are spaced out far enough: each submission is a scheduled post in its own right, so one that lands within about 30 minutes of a later slot takes that slot too.

The date returned for a Reddit account always comes from the account schedule. In the app, a subreddit that has a schedule of its own overrides it, so the slot you get here can differ from the date the app would pre-fill for that subreddit.

AccountScheduleDateType

socialAccountId
ID
The ID of the social account.
scheduleDate
DateTime
The next available slot from this account's schedule, or null if the account has no usable schedule.

nextScheduleDates Query

socialAccountIds
[ID]
List of social account IDs to query. Use the socialAccounts query to retrieve IDs for your connected accounts. See Social Accounts.
query nextScheduleDates($socialAccountIds: [ID]) {
  nextScheduleDates(socialAccountIds: $socialAccountIds) {
    socialAccountId
    scheduleDate
  }
}
Every account you asked for and manage is returned, even when it has no schedule set up — in that case scheduleDate is null (account 790 above). To place a post at the returned slot, pass it as the scheduled time when creating the post — or skip the round trip and let the mutation do it with schedulingMode: QUEUE_NEXT.