# Suggest when to post

> Page: https://docs.flung.dev/reference/api/get-v1-posting-times. Index of every page: https://docs.flung.dev/llms.txt

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-times`

## TL;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`](https://docs.flung.dev/reference/api/schemas.md#postingtimes). |
| In the SDK? | `flung.platforms.postingTimes()` |
| As an MCP tool? | [`suggest_posting_times`](https://docs.flung.dev/reference/mcp/suggest-posting-times.md) |
| 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](https://docs.flung.dev/reference/api/errors.md). |

## 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

**curl**

```bash
curl -X GET 'https://api.flung.dev/v1/posting-times?platform=x&timeZone=Australia%2FBrisbane' \
  --header "Authorization: Bearer $FLUNG_API_KEY"
```

**TypeScript**

```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',
})
```

**fetch**

```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`](https://docs.flung.dev/reference/api/schemas.md#postingtimes) |
| 401 | Missing, unknown, revoked or expired API key. | [`Error`](https://docs.flung.dev/reference/api/schemas.md#error) |
| 422 | The request failed validation. | [`Error`](https://docs.flung.dev/reference/api/schemas.md#error) |
| 429 | Too many requests for this credential; wait for `retry-after` seconds. | [`Error`](https://docs.flung.dev/reference/api/schemas.md#error) |

## Response body

A 200 answer has the type [`PostingTimes`](https://docs.flung.dev/reference/api/schemas.md#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](https://docs.flung.dev/reference/api.md) | Every endpoint |
| [Schemas](https://docs.flung.dev/reference/api/schemas.md) | Every request and response type |
| [Errors](https://docs.flung.dev/reference/api/errors.md) | Every error code and what to do about it |
| [`suggest_posting_times`](https://docs.flung.dev/reference/mcp/suggest-posting-times.md) | The same operation as an MCP tool |
