Overview
API reference
Every endpoint of the Flung REST API, grouped by what it does, with a page each that has its parameters, its answers and code samples in curl, TypeScript and fetch.
TL;DR
| Question | Answer |
|---|---|
| Where is it? | https://api.flung.dev. Every path below is relative to it. Preview, for trying changes, is https://api-preview.flung.dev. |
| How do I authenticate? | Send Authorization: Bearer <credential>: an API key (flung_sk_...), an OAuth access token, or, for the few calls a connect panel makes, a connect token (flung_ct_...). See Authentication. |
| What format? | JSON in and out, except uploading a file's bytes. Times are ISO 8601 in UTC. |
| What does an error look like? | One shape for every failure, with a stable code. See Errors. |
| Is it safe to retry a POST? | Yes, with an Idempotency-Key header: the same key returns the first answer instead of doing the work twice. The SDK sends one on every POST. |
| How fast may I call it? | 600 requests a minute per API key or OAuth app. Past that the answer is 429 with Retry-After. |
| Is there a typed client? | @flung.dev/sdk: every endpoint below as a typed method. |
| Where is the machine-readable form? | https://api.flung.dev/openapi.json (OpenAPI 3.1), also at https://docs.flung.dev/openapi.json. |
Endpoints
67 endpoints, grouped by what they do.
Posts
| Method | Path | What it does |
|---|---|---|
| GET | /v1/posts | List posts |
| POST | /v1/posts | Schedule a post |
| GET | /v1/posts/{id} | Get a post |
| PATCH | /v1/posts/{id} | Change a scheduled post |
| DELETE | /v1/posts/{id} | Delete a post |
| POST | /v1/posts/{id}/cancel | Cancel a scheduled post |
| POST | /v1/posts/{id}/retry | Retry the failed accounts of a post |
| GET | /v1/posts/{id}/metrics | Read a post's counts |
Accounts
| Method | Path | What it does |
|---|---|---|
| GET | /v1/accounts | List connected accounts |
| GET | /v1/accounts/{id} | Get a connected account |
| PATCH | /v1/accounts/{id} | Change an account's settings |
| DELETE | /v1/accounts/{id} | Disconnect an account |
| POST | /v1/accounts/{id}/refresh | Refresh an account now |
| GET | /v1/accounts/{id}/boards | List Pinterest boards |
| GET | /v1/accounts/{id}/posting-options | Read what a post may choose |
| POST | /v1/connect-tokens | Make a connect token for a page |
| POST | /v1/connect/{platform} | Start connecting an account |
| POST | /v1/accounts/{id}/reconnect | Start reconnecting an account |
| GET | /v1/connect-sessions/{id} | Get a connect session |
Webhooks
| Method | Path | What it does |
|---|---|---|
| GET | /v1/webhook-endpoints | List webhook endpoints |
| POST | /v1/webhook-endpoints | Add a webhook endpoint |
| POST | /v1/webhook-endpoints/{id}/rotate-secret | Rotate a signing secret |
| PATCH | /v1/webhook-endpoints/{id} | Change an endpoint |
| DELETE | /v1/webhook-endpoints/{id} | Delete a webhook endpoint |
| POST | /v1/webhook-endpoints/{id}/ping | Send a test event |
| GET | /v1/webhook-endpoints/{id}/deliveries | List deliveries |
API keys
| Method | Path | What it does |
|---|---|---|
| GET | /v1/api-keys | List API keys |
| POST | /v1/api-keys | Create an API key |
| DELETE | /v1/api-keys/{id} | Revoke an API key |
Members
| Method | Path | What it does |
|---|---|---|
| GET | /v1/me | Who is calling |
| GET | /v1/members | List members |
| POST | /v1/members | Add a member |
| DELETE | /v1/members/{userId} | Remove a member |
Media
| Method | Path | What it does |
|---|---|---|
| GET | /v1/media | List files |
| POST | /v1/media | Start an upload |
| PUT | /v1/media/{id}/parts/{partNumber} | Upload one part |
| POST | /v1/media/{id}/complete | Finish a multipart upload |
| PUT | /v1/media/{id}/content | Upload the bytes |
| POST | /v1/media/import | Import a file from a URL |
| GET | /v1/media/{id} | Get a file |
| DELETE | /v1/media/{id} | Delete a file |
Templates
| Method | Path | What it does |
|---|---|---|
| GET | /v1/templates | List templates |
| POST | /v1/templates | Create a template |
| GET | /v1/templates/{id} | Get a template |
| PATCH | /v1/templates/{id} | Change a template |
| DELETE | /v1/templates/{id} | Delete a template |
| POST | /v1/templates/{id}/deploy | Schedule a post from a template |
Variables
| Method | Path | What it does |
|---|---|---|
| GET | /v1/variables | List variables |
| PUT | /v1/variables/{name} | Set a variable |
| DELETE | /v1/variables/{name} | Delete a variable |
Feeds
| Method | Path | What it does |
|---|---|---|
| GET | /v1/feeds | List feeds |
| POST | /v1/feeds | Follow an RSS or Atom feed |
| PATCH | /v1/feeds/{id} | Change a feed |
| DELETE | /v1/feeds/{id} | Stop following a feed |
Platforms
| Method | Path | What it does |
|---|---|---|
| GET | /v1/platforms | List platforms and their limits |
| GET | /v1/posting-times | Suggest when to post |
Analytics
| Method | Path | What it does |
|---|---|---|
| GET | /v1/usage | API requests per credential per day |
| GET | /v1/stats | Workspace statistics |
Inbox
| Method | Path | What it does |
|---|---|---|
| GET | /v1/inbox | List comments and mentions |
| GET | /v1/inbox/{id} | Get an inbox item |
| PATCH | /v1/inbox/{id} | Mark an item read, unread or archived |
| POST | /v1/inbox/{id}/reply | Reply publicly |
| POST | /v1/accounts/{id}/inbox/sync | Read an account's inbox now |
Experience
| Method | Path | What it does |
|---|---|---|
| GET | /v1/experience | Read XP, level and achievements |
| GET | /v1/leaderboard | Read the leaderboard |
| PUT | /v1/leaderboard/entry | Join the leaderboard |
| DELETE | /v1/leaderboard/entry | Leave the leaderboard |
See also
| Doc | Why |
|---|---|
| Schemas | Every request and response type |
| Errors | Every error code |
| TypeScript SDK | The same calls, typed, with retries |
| MCP tools | The same operations for AI agents |