Platforms
Suggest when to post
The next times a platform's audience is usually most active, in the audience's time zone, as instants to pass to publishAt.
GET
/v1/posting-timesTL;DR
| Question | Answer |
|---|---|
| What does it do? | Suggest when to post. |
| What does it need? | An API key or an OAuth access token. |
| What does it take? | platform, timeZone, count in the query string. |
| What does it return? | Status 200 with a body of type PostingTimes. |
| In the SDK? | flung.platforms.postingTimes() |
| As an MCP tool? | suggest_posting_times |
| What can go wrong? | 401 Missing, unknown, revoked or expired API key; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape. |
What it does
The next times a platform's audience is usually most active, in the audience's time zone, as instants to pass to publishAt. General guidance from large studies, not this workspace's own audience.
Example
bash
curl -X GET 'https://api.flung.dev/v1/posting-times?platform=x&timeZone=Australia%2FBrisbane' \ --header "Authorization: Bearer $FLUNG_API_KEY"ts
import { Flung } from '@flung.dev/sdk'
const flung = new Flung({ apiKey: process.env.FLUNG_API_KEY! })const result = await flung.platforms.postingTimes({ platform: 'x', timeZone: 'Australia/Brisbane',})js
const response = await fetch('https://api.flung.dev/v1/posting-times?platform=x&timeZone=Australia%2FBrisbane', { method: 'GET', headers: { 'Authorization': `Bearer ${process.env.FLUNG_API_KEY}`, },})if (!response.ok) throw new Error((await response.json()).error.message)const result = await response.json()A successful answer looks like this:
json
{ "data": [ { "publishAt": "2026-11-03T10:00:00+10:00", "day": "string", "localHour": 1, "rank": 1 } ]}Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
platform | Platform | yes | |
timeZone | string | no | The audience's IANA time zone. |
count | integer | no |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The next suggested times, soonest first. | PostingTimes |
| 401 | Missing, unknown, revoked or expired API key. | Error |
| 422 | The request failed validation. | Error |
| 429 | Too many requests for this credential; wait for retry-after seconds. | Error |
Response body
A 200 answer has the type PostingTimes.
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | yes | |
data[].publishAt | string | yes | |
data[].day | string | yes | |
data[].localHour | integer | yes | |
data[].rank | integer | yes | 1 is the platform's best slot of the week. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint |
| Schemas | Every request and response type |
| Errors | Every error code and what to do about it |
suggest_posting_times | The same operation as an MCP tool |