Skip to content

API: free usage allowance on an organization's plan - #2108

Merged
davidmckayv merged 3 commits into
mainfrom
free-runs-spec
Nov 24, 2026
Merged

davidmckayv merged 3 commits into
mainfrom
free-runs-spec

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

OpenBot Cloud's free trial becomes a number of free runs each person gets, instead of 30 days that start with a card. This is the API side: the plan read says how much of the allowance is used, and the refusal at the cap is declared everywhere a run starts. All additive.

What changed

  • OrganizationPlan.status gains free: the organization isn't on the plan and the person reading has free runs left. none keeps meaning a card is needed (the free runs are used up, there are none, or the plan ended). past_due is unchanged.
  • freeRunsUsedPercent, an integer from 0 to 100: how much of the reading person's own allowance is used, across every organization they're in. Rounded down, so it reads 100 only once every run is used. Present only while a plan is required and the organization is neither active nor trialing. The count itself is never sent.
  • freeRunsAllowance, an integer of at least 1: the allowance's size. Present only once the person has used it all, so the number never shows while runs are left.
  • The 402 PLAN_REQUIRED refusal is declared on every operation that starts a run: runRoutine, runCheckIn, startCheckInItem, workOnCheckInItem, runGoal, startVoiceCall and retryTask, besides sendConversationMessage, which already had it.
  • The plan's descriptions and the 402's examples no longer say 30-day trial. The examples now show an admin and a member at the cap. trialing and trialEndsAt stay in the schema, described as not used by OpenBot Cloud's free allowance.
  • New plan examples: on the free allowance at 42%, the allowance used up (status none, freeRunsAllowance 500, addCardUrl), and on the plan.

The bundle and the app, phone and Recorder clients are regenerated. No screen changes here.

Checks run locally

  • bun run api:lint: valid.
  • oasdiff 1.38.0 breaking against main's bundle with --fail-on WARN: no breaking changes. The changelog shows 9 info-level changes: seven new 402 responses and two new optional properties.
  • bun run api:generate run again leaves no diff (bundle and client drift both clean).
  • bun test api/ (client boundary and every spec test), the deprecations test, the plan notices test and the tolerant-reader test all pass.
  • App and Recorder typecheck clean.

OpenBot Cloud's free trial becomes a number of runs each person gets, not 30 days with a card.
The plan read says how much of it is used and, once it is used up, how big it was.

- OrganizationPlan.status gains free: the organization isn't on the plan and the person
  reading has free runs left. none keeps meaning a card is needed.
- freeRunsUsedPercent (0 to 100, rounded down) is the reading person's share used, present
  while a plan is required and the organization is neither active nor trialing.
- freeRunsAllowance is the allowance's size, present only once it is used up, so the number
  never shows while runs are left.
- The 402 PLAN_REQUIRED refusal is declared on every operation that starts a run: runRoutine,
  runCheckIn, startCheckInItem, workOnCheckInItem, runGoal, startVoiceCall and retryTask, as
  well as sendConversationMessage.
- Descriptions and examples no longer say 30-day trial. trialing and trialEndsAt stay, unused
  by OpenBot Cloud's free allowance.

All additive. The bundle and the app, phone and Recorder clients are regenerated.
@davidmckayv
davidmckayv merged commit 53778ad into main Nov 24, 2026
23 checks passed
@davidmckayv
davidmckayv deleted the free-runs-spec branch November 24, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant