Skip to content

API: refuse an invitation with SEAT_REQUIRED when every paid seat is taken - #2133

Merged
davidmckayv merged 2 commits into
mainfrom
seat-required-spec
Nov 24, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
seat-required-spec

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

On OpenBot Cloud's per-member plan an organization holds only the seats it paid for. Once it has paid, inviting one more person needs another seat first, and today that refusal reaches the person as "That couldn't be done just now. Try again." This is the API side: the invite operation declares the refusal, with where an admin adds the seat. Additive only.

What changed

  • createOrganizationInvitation declares a 402 SEAT_REQUIRED problem (SeatRequired response): every seat the organization paid for is taken, nothing was invited. Its example's detail is the sentence a person reads: "Each member is $5 a month. Add a seat to invite someone."
  • Problem gains an optional addSeatUrl (string or null, uri-reference): on SEAT_REQUIRED, where an owner or an admin adds one more seat in the browser, coming back to OpenBot to send the invitation. Null for anyone who can't add a seat.
  • The operation's description says an organization that pays per member needs a free seat for the person.
  • CHANGELOG: one line under Unreleased, API.

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 and the accepted list: no breaking changes. The changelog is info only: the new 402 and the new optional property.
  • bun run api:generate run again leaves no diff (bundle and client drift clean).
  • bun test api/ (client boundary and every spec test) and the deprecations test pass.

…taken

An organization on OpenBot Cloud's per-member plan holds only the seats it paid for, so inviting one more person needs another seat first. createOrganizationInvitation now declares a 402 SEAT_REQUIRED problem for that case, and problems gain an optional addSeatUrl: where an owner or an admin adds a seat in the browser, coming back to OpenBot to send the invitation. Additive only. Bundle and the app, phone and Recorder clients regenerated.
Every response now declares the request id header, and the SEAT_REQUIRED 402 on createOrganizationInvitation was added beside that rule without it.
@davidmckayv
davidmckayv merged commit 436d07d into main Nov 24, 2026
23 checks passed
@davidmckayv
davidmckayv deleted the seat-required-spec branch November 24, 2026 20:34
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