# List platforms and their limits

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

What each platform accepts, so a post can be checked before it is sent.

`GET /v1/platforms`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | List platforms and their limits. |
| What does it need? | An API key, an OAuth access token, or a connect token (this is one of the calls a connect token may make). |
| What does it take? | Nothing. |
| What does it return? | Status 200 with a body of type [`PlatformList`](https://docs.flung.dev/reference/api/schemas.md#platformlist). |
| In the SDK? | `flung.platforms.list()` |
| As an MCP tool? | [`list_platforms`](https://docs.flung.dev/reference/mcp/list-platforms.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). |

## Example

**curl**

```bash
curl -X GET 'https://api.flung.dev/v1/platforms' \
  --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.list()
```

**fetch**

```js
const response = await fetch('https://api.flung.dev/v1/platforms', {
  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": [
    {
      "platform": "x",
      "connectable": true,
      "maxTextLength": 1,
      "requiresMedia": true,
      "maxImages": 1,
      "video": true,
      "maxImageBytes": 1,
      "maxVideoBytes": 1,
      "postsPerHour": 1,
      "tokensExpire": true,
      "destinations": true
    }
  ]
}
```

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | Every platform. | [`PlatformList`](https://docs.flung.dev/reference/api/schemas.md#platformlist) |
| 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 [`PlatformList`](https://docs.flung.dev/reference/api/schemas.md#platformlist).

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | `PlatformInfo[]` | yes |  |
| `data[].platform` | `Platform` | yes |  |
| `data[].connectable` | `boolean` | yes | Whether this Flung has the platform's app credentials, so accounts can be connected. |
| `data[].maxTextLength` | `integer` | yes |  |
| `data[].requiresMedia` | `boolean` | yes | Refuses text-only posts. |
| `data[].maxImages` | `integer` | yes | Images in one post; 0 when images are not accepted. |
| `data[].video` | `boolean` | yes | Takes one video per post. |
| `data[].maxImageBytes` | `integer` | yes |  |
| `data[].maxVideoBytes` | `integer` | yes |  |
| `data[].postsPerHour` | `integer` | yes | How fast Flung publishes to one account, to stay inside the platform's limits. |
| `data[].tokensExpire` | `boolean` | yes | Whether connections expire; Flung renews them before they do where the platform allows. |
| `data[].destinations` | `boolean` | yes | Posts go to a destination chosen per post (Pinterest boards). |

## 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 |
| [`list_platforms`](https://docs.flung.dev/reference/mcp/list-platforms.md) | The same operation as an MCP tool |
