API reference

Scheduling

2 endpoints, served at https://orbitwrite.com/api/v1. Each one lists the credentials it accepts, its parameters and every response it can give.

Suggested publish times per channel#

GET/api/v1/scheduling/suggestions

Candidate times to schedule a post at, one entry per connected channel. The slot strategies return the workspace's configured posting slots that nothing is scheduled on yet — the same placement the composer's queue makes, so a caller and the calendar agree on which slots are free. best-time instead ranks a static, research-informed engagement profile for the platform; it is a heuristic, not measured analytics (researched says whether the platform has a profile of its own or the generic fallback). Requires postingSchedule:read and account:read; the slot strategies also require post:read, since occupancy is post data.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Query parameters

organizationIdstring

Session callers only — an API key already determines the workspace.

At least 1 character.

accountIdsstring | string[]

Repeat to scope to particular channels. Omitted means every connected channel in the workspace.

strategystring

first-available (default) takes the soonest free slot; queue appends after everything already booked, so a run of posts keeps its order; best-time ignores the configured schedule and ranks the platform's engagement profile.

  • "first-available"
  • "queue"
  • "best-time"
countinteger

Candidates per channel. Defaults to 1.

Between 1 and 10.

afterstring

Search from this instant instead of now — for planning a batch beyond what is already scheduled.

Format date-time.

Responses

200TimeSuggestionList

Suggested times, one entry per channel

Response attributes
suggestionsAccountTimeSuggestion[]Required
Child attributes
accountIdstringRequired
platformstringRequired
timezonestringRequired

IANA zone the times were placed in — the workspace's, falling back to the channel's and then UTC.

timesSuggestedTime[]Required

Soonest first for the slot strategies, strongest first for best-time. Empty when the channel has no free slot inside the two-week lookahead.

Child attributes
atstringRequired

ISO 8601 instant to schedule at.

sourcestringRequired

slot — a configured posting slot with nothing on it. best-time — a peak cell of the platform's engagement profile.

  • "slot"
  • "best-time"
reasonstring | any | nullRequired

Why these times, for a best-time answer. Null for the slot strategies, where the reason is the workspace's own configuration.

researchedbooleanRequired

Whether reason reflects a profile researched for this platform or the generic fallback window. Best-time data is a heuristic either way — there is no per-account analytics behind it yet, so do not report it to a person as measured engagement.

400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/scheduling/suggestions
curl -X GET "https://orbitwrite.com/api/v1/scheduling/suggestions" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "suggestions": [
    {
      "accountId": "string",
      "platform": "string",
      "timezone": "string",
      "times": [
        {
          "at": "string",
          "source": "slot"
        }
      ],
      "reason": "string",
      "researched": true
    }
  ]
}

Slots for a run of posts at a cadence#

GET/api/v1/scheduling/plan

Places a run of posts — a campaign — into the workspace's free posting slots: one instant per post, free on every named channel where their schedules allow it, spread across the range's days at perWeek, or month by month at perMonth. Ranges up to a year. The same slots and occupancy /scheduling/suggestions reads, so a plan never books a slot the calendar shows as taken. Nothing is written. Requires account:read, postingSchedule:read and post:read.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Query parameters

organizationIdstring

Session callers only — an API key already determines the workspace.

At least 1 character.

accountIdsstring | string[]Required

Repeat for each channel the run goes out on.

countinteger

How many posts. Defaults to perWeek × the range in weeks.

Between 1 and 40.

perWeekinteger

Posts per week. Defaults to 3.

Between 1 and 21.

perMonthinteger

Posts per month, for a slower run: placed within each month of the range, counted from startDate. Instead of perWeek.

Between 1 and 31.

startDatestring

First day, YYYY-MM-DD in the workspace's zone. Defaults to today.

endDatestring

Last day (inclusive), YYYY-MM-DD in the workspace's zone.

Responses

200PlannedRun

The placed slots

Response attributes
timezonestringRequired

IANA zone the days were counted in — the workspace's.

startDatestringRequired

First day searched, YYYY-MM-DD.

endDatestringRequired

Last day searched, YYYY-MM-DD.

perWeekinteger | nullRequired

Posts per week, when the run was placed weekly.

perMonthinteger | nullRequired

Posts per month, when the run was placed month by month.

requestedintegerRequired

Posts asked for; slots is shorter when the range ran out of free slots.

slotsPlannedSlot[]Required
Child attributes
atstringRequired

ISO 8601 instant to schedule at.

accountIdsstring[]Required

The channels this instant is a free posting slot on.

partialbooleanRequired

True when the slot is free on only some of the channels — their schedules don't share enough free times in the range.

400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/scheduling/plan
curl -X GET "https://orbitwrite.com/api/v1/scheduling/plan?accountIds=accountIds" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "timezone": "string",
  "startDate": "string",
  "endDate": "string",
  "perWeek": 0,
  "perMonth": 0,
  "requested": 0,
  "slots": [
    {
      "at": "string",
      "accountIds": [
        "string"
      ],
      "partial": true
    }
  ]
}