GET/v1/me
Check your key. Returns the key you authenticated with and its scopes. Works with any scope; use it to verify setup.
Scope: any valid key
curl "https://www.usebrix.app/api/v1/me" \
-H "Authorization: Bearer $BRIX_API_KEY"Bring your subscriptions, free trials, and reminders into your own apps: a budget spreadsheet, a Discord bot, a home dashboard, or a shortcut on your phone. Every request acts for one Brix user with a key they create and can revoke.
BRIX_API_KEY. Never put it in a web page, a mobile app bundle, or a public repo.curl https://www.usebrix.app/api/v1/me \
-H "Authorization: Bearer $BRIX_API_KEY"const res = await fetch("https://www.usebrix.app/api/v1/charges/upcoming?days=7", {
headers: { Authorization: `Bearer ${process.env.BRIX_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const { data } = await res.json();
for (const c of data)
console.log(`${c.merchant}: $${c.amount} on ${c.next_date}`);import os, requests
r = requests.post(
"https://www.usebrix.app/api/v1/reminders",
headers={"Authorization": f"Bearer {os.environ['BRIX_API_KEY']}"},
json={"merchant": "Spotify", "when": "2 days before"},
timeout=10,
)
r.raise_for_status()
print(r.json()["remind_at"])Send the key as a bearer token: Authorization: Bearer brix_sk_…. Brix stores only a SHA-256 hash of it. Each user can have up to 5 active keys; revoking one stops it immediately. Each key carries scopes, and an endpoint without its scope returns 403 insufficient_scope.
| Scope | Allows |
|---|---|
charges:read | Read charges, upcoming charges, and the spending summary. |
charges:write | Add trials and mark charges to cancel or active. |
reminders:read | List reminders. |
reminders:write | Create and delete reminders. |
cards:read | List single-use cards (masked; never card numbers). |
news:read | Read subscription news about your merchants. |
refunds:read | Read school refunds and their plans. |
practice:read | Read the practice portfolio (virtual money): value, positions, rules, orders. |
https://www.usebrix.app/api/v1snake_case fields, amounts in USD as decimal numbers, dates as YYYY-MM-DD. Lists come back as { "object": "list", "data": [...] }.X-RateLimit-Limit and X-RateLimit-Remaining; a 429 includes Retry-After.POST /trials accepts an Idempotency-Key header; repeating it returns the first result. Creating the same reminder twice is already safe.Brix-Version: 2026-10-24. We add fields without notice; we never remove or rename fields within /v1.X-Request-Id, also inside error bodies. Include it when you report a problem.{
"error": {
"type": "insufficient_scope",
"message": "This key is missing the `charges:write` scope.",
"request_id": "req_4f1c9a0b2e7d4c3a8b19"
}
}| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request | A parameter or body field is missing or invalid. |
| 401 | authentication_failed | The key is missing, malformed, unknown, or revoked. |
| 403 | insufficient_scope | The key doesn't have the scope this endpoint needs. |
| 404 | not_found | No charge or reminder with that ID belongs to this user. |
| 409 | conflict | The change conflicts with the current state, e.g. a sent reminder. |
| 413 | request_too_large | The body is larger than 64 KB. |
| 429 | rate_limited | More than 120 requests in a minute. Wait for `Retry-After`. |
| 502 | upstream_unavailable | A provider such as the news service didn't respond. |
| 500 | api_error | Something failed on our side. Retry; share the request ID if it continues. |
The full machine-readable spec is at /api/v1/openapi.json (OpenAPI 3.1). Import it into Postman, Insomnia, or a client generator.
/meCheck your key/chargesList charges/charges/upcomingUpcoming charges/charges/{id}Get a charge/charges/{id}Mark to cancel / reactivate/trialsAdd a free trial/summarySpending summary/remindersList reminders/remindersCreate a reminder/reminders/{id}Delete a reminder/cardsList cards/newsMerchant news/refundsList refunds/practicePractice portfolio/v1/meCheck your key. Returns the key you authenticated with and its scopes. Works with any scope; use it to verify setup.
Scope: any valid key
curl "https://www.usebrix.app/api/v1/me" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/chargesList charges. Every subscription and trial Brix knows about, sorted by next expected date.
Scope: charges:read
curl "https://www.usebrix.app/api/v1/charges?status=active" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/charges/upcomingUpcoming charges. Active subscriptions and trials expected within the next `days` days (default 14, max 90).
Scope: charges:read
curl "https://www.usebrix.app/api/v1/charges/upcoming?days=7" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/charges/{id}Get a charge. One charge by ID.
Scope: charges:read
curl "https://www.usebrix.app/api/v1/charges/ch_123" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/charges/{id}Mark to cancel / reactivate. Set `status` to `to_cancel` to mark a charge for cancellation, or `active` to undo it. Brix never cancels at the merchant; the response includes the merchant's cancel link when known.
Scope: charges:write
curl -X PATCH "https://www.usebrix.app/api/v1/charges/ch_123" \
-H "Authorization: Bearer $BRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"to_cancel"}'/v1/trialsAdd a free trial. Track a free trial so Brix reminds you before it bills. Send an `Idempotency-Key` header to make retries safe.
Scope: charges:write
curl -X POST "https://www.usebrix.app/api/v1/trials" \
-H "Authorization: Bearer $BRIX_API_KEY" \
-H "Idempotency-Key: trial-notion-nov" \
-H "Content-Type: application/json" \
-d '{"merchant":"Notion AI","end_date":"2026-11-15","amount":10}'/v1/summarySpending summary. Monthly subscription total, counts, the next 14 days, and the estimated amount avoided this month.
Scope: charges:read
curl "https://www.usebrix.app/api/v1/summary" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/remindersList reminders. Scheduled and sent reminders, earliest first.
Scope: reminders:read
curl "https://www.usebrix.app/api/v1/reminders" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/remindersCreate a reminder. Remind the user about a charge. Identify it by `charge_id` or `merchant`. `when` accepts a future `YYYY-MM-DD`, an ISO timestamp, or `N days before`. Delivery is WhatsApp when the user enabled it, otherwise in the app.
Scope: reminders:write
curl -X POST "https://www.usebrix.app/api/v1/reminders" \
-H "Authorization: Bearer $BRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"merchant":"Spotify","when":"2 days before"}'/v1/reminders/{id}Delete a reminder. Removes a reminder that hasn't been sent yet.
Scope: reminders:write
curl -X DELETE "https://www.usebrix.app/api/v1/reminders/manual:…" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/cardsList cards. Single-use cards created in Brix. Only the last four digits are returned. Creating cards is not available through the API; it requires confirmation in the app.
Scope: cards:read
curl "https://www.usebrix.app/api/v1/cards" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/newsMerchant news. Recent articles about pricing or renewal changes at the user's top merchants. Articles don't confirm a change to the user's own plan.
Scope: news:read
curl "https://www.usebrix.app/api/v1/news" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/refundsList refunds. School refunds (aid left after tuition) Brix detected or the user added, with any saved plan. `loan_amount` is the borrowed part; federal Direct Loan money can be returned within 120 days without interest.
Scope: refunds:read
curl "https://www.usebrix.app/api/v1/refunds" \
-H "Authorization: Bearer $BRIX_API_KEY"/v1/practicePractice portfolio. The user's paper-trading portfolio: virtual cash, positions at live prices, gain compared with the S&P 500 (VOO), auto-invest rules, and recent orders. No real money is involved. `null` when the user hasn't started one.
Scope: practice:read
curl "https://www.usebrix.app/api/v1/practice" \
-H "Authorization: Bearer $BRIX_API_KEY"/charges with source: "plaid".to_cancel records the decision and returns the merchant’s cancel link.Charges from linked banks are Plaid sandbox data; cards are Lithic sandbox cards and can’t spend real money. Treat a key like a password: anyone holding it can read that user’s subscriptions. If one leaks, revoke it on the Developers page and create a new one.
Brix is open source. The code, setup guide and tests are on GitHub. A local copy runs as a demo with sample data and no accounts.
git clone https://github.com/Timeless-Dave/brix
cd brix
npm install
cp .env.example .env.local
npm run devThe example file turns on BRIX_DEMO_MODE and NEXT_PUBLIC_BRIX_DEMO_MODE, which skip sign-in and share one sample account. Both must be false in production. Checks: npm run lint, npm run typecheck, npm test and npx playwright test.
Names from .env.example. Leave a provider’s values empty to keep that integration off.
| Area | Variables |
|---|---|
| Demo | BRIX_DEMO_MODENEXT_PUBLIC_BRIX_DEMO_MODEAPP_URL |
| Firebase | NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_APP_IDFIREBASE_ADMIN_PROJECT_IDFIREBASE_ADMIN_CLIENT_EMAILFIREBASE_ADMIN_PRIVATE_KEY |
| Plaid | PLAID_CLIENT_IDPLAID_SECRETPLAID_ENV |
| Anthropic | ANTHROPIC_API_KEYANTHROPIC_MODEL |
| Twilio | TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_WHATSAPP_FROMTWILIO_PHONE_NUMBERNEXT_PUBLIC_TWILIO_PHONE_NUMBERTWILIO_VERIFY_SERVICE_SIDNEXT_PUBLIC_WHATSAPP_NUMBERNEXT_PUBLIC_WHATSAPP_JOIN_CODE |
| Vapi | VAPI_API_KEYVAPI_ASSISTANT_IDVAPI_PHONE_NUMBER_IDVAPI_SERVER_SECRETNEXT_PUBLIC_VAPI_PHONE_NUMBER |
| Lithic | LITHIC_API_KEYLITHIC_ENV |
| Other | NEWS_API_KEYCRON_SECRETADMIN_EMAILS |