Billing
The workspace's plan
Which plan this credential's workspace is on, its limits, and what counts against them now.
GET
/v1/billingTL;DR
| Question | Answer |
|---|---|
| What does it do? | The workspace's plan. |
| What does it need? | An API key or an OAuth access token. |
| What does it take? | Nothing. |
| What does it return? | Status 200 with a body of type Billing. |
| In the SDK? | flung.billing.get() |
| As an MCP tool? | get_billing |
| 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
Which plan this credential's workspace is on, its limits, and what counts against them now. Every API key, OAuth app and connect token of a workspace shares its plan. Upgrading happens on the portal, at upgradeUrl.
Example
curl
curl -X GET 'https://api.flung.dev/v1/billing' \ --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.billing.get()js
const response = await fetch('https://api.flung.dev/v1/billing', { 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
{ "plan": "free", "source": "free", "status": "string", "currentPeriodEnd": "2026-11-01T09:00:00.000Z", "cancelAtPeriodEnd": true, "limits": { "accounts": 1, "postsPerMonth": 1, "profiles": 1, "requestsPerMinute": 1, "mediaBytes": 1, "webhookEndpoints": 1, "accountsPerPlatformPerProfile": 1 }, "usage": { "accounts": 1, "postsThisMonth": 1, "profiles": 1, "mediaBytes": 1, "webhookEndpoints": 1 }, "upgradeUrl": "https://example.com"}Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The plan. | Billing |
| 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 Billing.
| Field | Type | Required | Description |
|---|---|---|---|
plan | "free" | "pro" | "business" | yes | The plan: free, pro ($19 a month) or business ($59 a month). |
source | "free" | "subscription" | "override" | yes | Where the plan comes from: no subscription, a paying Stripe subscription, or set by Flung. |
status | string | yes | The subscription's Stripe status, or none. |
currentPeriodEnd | string | null | yes | |
cancelAtPeriodEnd | boolean | yes | |
limits | PlanLimits | yes | |
limits.accounts | integer | yes | Connected social accounts that are not disconnected. |
limits.postsPerMonth | integer | yes | Posts created in one UTC calendar month; a post counts once however many accounts it goes to. |
limits.profiles | integer | null | yes | Profiles; null is no limit. |
limits.requestsPerMinute | integer | yes | Requests a minute for each API key, OAuth app or connect token. |
limits.mediaBytes | integer | yes | Stored media, in bytes. |
limits.webhookEndpoints | integer | yes | |
limits.accountsPerPlatformPerProfile | integer | null | yes | Live accounts of one platform in one profile, the accounts outside every profile counting as one profile; a LinkedIn page counts apart from a LinkedIn profile. Across the workspace a platform also has at most this times profiles. A second is refused with platform_limit_reached. null is no limit. |
usage | object | yes | What counts against each limit now. |
usage.accounts | integer | yes | |
usage.postsThisMonth | integer | yes | |
usage.profiles | integer | yes | |
usage.mediaBytes | integer | yes | |
usage.webhookEndpoints | integer | yes | |
upgradeUrl | string | null | yes | The workspace's Plan page on the Flung portal, where an owner upgrades. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint |
| Schemas | Every request and response type |
| Errors | Every error code and what to do about it |
get_billing | The same operation as an MCP tool |