API reference

This is the API the web app and the phone apps use. The reference is read straight from the OpenAPI document the apps are built against, so it follows the code. The descriptions are in English. There are no API keys yet, so there's no “try it” button. Every call comes from a signed-in session.

What it is

Everything lives under /api/v1 and speaks JSON. The apps' client and this reference are both generated from the OpenAPI document at /openapi.json. An endpoint without a summary or a tag fails the build.

Signing in

POST /api/v1/auth/login (or a social login) sets the bryti_session cookie. Send it on every call. A call without a valid session answers 401. The web app's own origin proxies /api/*, so the cookie stays first-party and there is no CORS. Routes marked “No session needed” can be called before you have one.

Versions

A build sends its version in X-App-Version. Below the minimum supported app version, every call answers 426 Upgrade Required with the problem app-version-unsupported, and the app must update. GET /api/v1/app/version says what that version is.

Errors

Errors come as RFC 9457 application/problem+json. The body has a stable type URL under https://bryti.app/problems/, a title and the status. It also has a detail for the person reading, a code for the program and the request's traceId. 400 means the API could not use the request, and 403 that the role is not allowed. 404 means the thing is not there, and 409 that the state has changed since you read it.

Rate limits and quota

Signing in, geocoding, the waiting list and product search are rate-limited per address, and a call past the limit answers 429 with Retry-After in seconds. The AI quota answers 429 too, without Retry-After, and renews with the plan's period.

Tracing

Quote the X-Trace-Id from the answer when you report a problem. Server-Timing says where the time went, and X-Diagnostics breaks it down when the call asks for it with X-Diagnostics: 1 or ?diagnostics=1.

A first call

curl -b "bryti_session=…" "https://bryti.app/api/v1/me"

Sections

  • Auth
    Sign up, sign in, social login, and the caller's own account.
  • Households
    The household itself: create it, read it, change its settings.
  • Members
    The people at the table — adults, Juniors, babies and guests.
  • Memberships & invites
    Who belongs to which household, and how they got in.
  • Constraints
    Allergies, intolerances and diets the planner filters dishes by.
  • Preferences
    What the household likes and does not like.
  • Rules
    Household meal rules the planner plans around.
  • Events
    Meal events on the calendar that change what a day needs.
  • Plans
    The week: plan it, read it, swap a dinner, lock a day.
  • Candidates
    Dinner candidates Bryti suggests for a day.
  • Recipes
    The household's recipe book.
  • Wishes
    The household's wish list: dishes the members would like, and their thumbs-up.
  • Imports
    Recipes and receipts brought in from photos, files and links.
  • Inventory & shopping
    The pantry, leftovers and the shopping list.
  • Stores
    The stores the household shops at and the prices Bryti has seen.
  • Outcomes
    What happened after a dinner: cooked, skipped, leftovers.
  • Home
    The day as the home screen shows it.
  • Chat
    Bryti in the chat: conversations, turns and proposed actions.
  • Calendar feeds
    Subscribe to the week from a calendar app.
  • Push
    The devices that receive push notifications.
  • Usage
    AI credits used and left this period.
  • Billing
    Subscriptions and the Stripe checkout.
  • Privacy
    Export the household's data, or delete it.
  • Intake
    Whether sign-up is open, and the waiting list.
  • App
    Version floor and health, for the apps and the platform.
  • Open data
    Data Bryti shares back, such as the Open Food Facts derivative under ODbL.
  • Feedback
    Report a problem from inside the app.