Skip to main content

Endpoint

POST https://api.ugc.inc/post/preview-schedule

Overview

Preview how posts will be scheduled before actually creating or updating them. The endpoint processes entries sequentially, accounting for conflicts between entries in the batch and existing posts on each account. Returns the finalized time for each entry, indicating whether it was adjusted from the requested time. This is useful for showing users the exact times their posts will be scheduled at, since the scheduling system may adjust times to avoid conflicts (minimum 2-hour gap between posts on the same account).
Batch Awareness:Entries are processed in order. Each entry’s finalized time is considered when scheduling subsequent entries in the same batch. This means if two entries target the same account at the same time, the second one will be bumped.

Request Body

entries
array
required
Array of schedule entries to preview
excludePostIds
string[]
Array of post IDs to exclude from conflict checks. Useful when editing or approving multiple posts — pass all their IDs so they don’t conflict with each other’s stale database state.

Response

data
array
Array of preview results, one per entry in the same order

Error Cases

  • 400 Bad Request: Missing entries array, empty entries, or entries missing required fields
curl -X POST https://api.ugc.inc/post/preview-schedule \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entries": [
      { "accountId": "acc_123", "postTime": "2026-02-19T20:45:00Z" },
      { "accountId": "acc_123", "postTime": "2026-02-19T21:00:00Z" }
    ]
  }'
{
  "ok": true,
  "code": 200,
  "data": [
    {
      "accountId": "acc_123",
      "requestedTime": "2026-02-19T20:45:00.000Z",
      "scheduledTime": "2026-02-19T20:45:00.000Z",
      "bumped": false
    },
    {
      "accountId": "acc_456",
      "requestedTime": "2026-02-19T21:00:00.000Z",
      "scheduledTime": "2026-02-19T21:00:00.000Z",
      "bumped": false
    }
  ]
}