Skip to content
Connect an agent

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

QuestionAnswer
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

MethodPathWhat it does
GET/v1/postsList posts
POST/v1/postsSchedule 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}/cancelCancel a scheduled post
POST/v1/posts/{id}/retryRetry the failed accounts of a post
GET/v1/posts/{id}/metricsRead a post's counts

Accounts

MethodPathWhat it does
GET/v1/accountsList 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}/refreshRefresh an account now
GET/v1/accounts/{id}/boardsList Pinterest boards
GET/v1/accounts/{id}/posting-optionsRead what a post may choose
POST/v1/connect-tokensMake a connect token for a page
POST/v1/connect/{platform}Start connecting an account
POST/v1/accounts/{id}/reconnectStart reconnecting an account
GET/v1/connect-sessions/{id}Get a connect session

Webhooks

MethodPathWhat it does
GET/v1/webhook-endpointsList webhook endpoints
POST/v1/webhook-endpointsAdd a webhook endpoint
POST/v1/webhook-endpoints/{id}/rotate-secretRotate 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}/pingSend a test event
GET/v1/webhook-endpoints/{id}/deliveriesList deliveries

API keys

MethodPathWhat it does
GET/v1/api-keysList API keys
POST/v1/api-keysCreate an API key
DELETE/v1/api-keys/{id}Revoke an API key

Members

MethodPathWhat it does
GET/v1/meWho is calling
GET/v1/membersList members
POST/v1/membersAdd a member
DELETE/v1/members/{userId}Remove a member

Media

MethodPathWhat it does
GET/v1/mediaList files
POST/v1/mediaStart an upload
PUT/v1/media/{id}/parts/{partNumber}Upload one part
POST/v1/media/{id}/completeFinish a multipart upload
PUT/v1/media/{id}/contentUpload the bytes
POST/v1/media/importImport a file from a URL
GET/v1/media/{id}Get a file
DELETE/v1/media/{id}Delete a file

Templates

MethodPathWhat it does
GET/v1/templatesList templates
POST/v1/templatesCreate 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}/deploySchedule a post from a template

Variables

MethodPathWhat it does
GET/v1/variablesList variables
PUT/v1/variables/{name}Set a variable
DELETE/v1/variables/{name}Delete a variable

Feeds

MethodPathWhat it does
GET/v1/feedsList feeds
POST/v1/feedsFollow an RSS or Atom feed
PATCH/v1/feeds/{id}Change a feed
DELETE/v1/feeds/{id}Stop following a feed

Platforms

MethodPathWhat it does
GET/v1/platformsList platforms and their limits
GET/v1/posting-timesSuggest when to post

Analytics

MethodPathWhat it does
GET/v1/usageAPI requests per credential per day
GET/v1/statsWorkspace statistics

Inbox

MethodPathWhat it does
GET/v1/inboxList 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}/replyReply publicly
POST/v1/accounts/{id}/inbox/syncRead an account's inbox now

Experience

MethodPathWhat it does
GET/v1/experienceRead XP, level and achievements
GET/v1/leaderboardRead the leaderboard
PUT/v1/leaderboard/entryJoin the leaderboard
DELETE/v1/leaderboard/entryLeave the leaderboard

See also

DocWhy
SchemasEvery request and response type
ErrorsEvery error code
TypeScript SDKThe same calls, typed, with retries
MCP toolsThe same operations for AI agents