Skip to content
BrainyShorts Docs
Esc
navigateopen⌘Jpreview

Get plan and usage

The current plan, posts used this UTC month, and connected-account allowance.

GET/api/cli/usage
Authorization
AuthorizationBearer token (ba_sk_...) · headerrequired

API key from /dashboard/api-keys. Keys expire after 365 days.

Responses
200

OK

planstring

Plan or entitlement name, such as Free, Creator, or Pro

billing_enabledboolean
postsobject
Show properties
limitinteger | null

null means unlimited

usedinteger
remaininginteger | null
periodstring
resets_atstring<date-time>
social_accountsobject
Show properties
limitinteger | null
usedinteger
remaininginteger | null
subscriptionobject | null
upgrade_urlstring<uri>
plansobject[]
401

Missing, invalid, expired, or revoked API key

errorstringrequired
codestring
Try it
Server
Authorization
Request
curl -X GET "https://www.brainyshorts.com/api/cli/usage" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "plan": "string",
  "billing_enabled": true,
  "posts": {
    "limit": 0,
    "used": 0,
    "remaining": 0,
    "period": "string",
    "resets_at": "2019-08-24T14:15:22Z"
  },
  "social_accounts": {
    "limit": 0,
    "used": 0,
    "remaining": 0
  },
  "subscription": {},
  "upgrade_url": "http://example.com",
  "plans": [
    {}
  ]
}