Skip to content

Commit 9df15e4

Browse files
author
Amram Englander
committed
Add API reference page to docs
1 parent f72b460 commit 9df15e4

2 files changed

Lines changed: 294 additions & 0 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default defineConfig({
1515
nav: [
1616
{ text: 'Guide', link: '/getting-started' },
1717
{ text: 'Commands', link: '/commands' },
18+
{ text: 'API Reference', link: '/api' },
1819
{ text: 'Claude Code Skill', link: '/claude-code-skill' },
1920
],
2021

@@ -24,6 +25,7 @@ export default defineConfig({
2425
items: [
2526
{ text: 'Getting Started', link: '/getting-started' },
2627
{ text: 'Commands', link: '/commands' },
28+
{ text: 'API Reference', link: '/api' },
2729
{ text: 'Claude Code Skill', link: '/claude-code-skill' },
2830
{ text: 'Contributing', link: '/contributing' },
2931
],

docs/api.md

Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
1+
# API Reference
2+
3+
This page documents the reverse-engineered RiseUp API that powers the CLI. All endpoints are read-only GET requests. The base URL is `https://input.riseup.co.il`.
4+
5+
::: warning
6+
This is an unofficial, undocumented API. Endpoints and response shapes may change without notice.
7+
:::
8+
9+
## Authentication
10+
11+
Every request requires these headers:
12+
13+
| Header | Value |
14+
|--------|-------|
15+
| `Cookie` | Session cookies from browser login |
16+
| `COMMIT-HASH` | Build hash extracted from the RiseUp web app |
17+
| `RISEUP-PLATFORM` | `WEB` |
18+
| `Accept` | `application/json` |
19+
20+
Sessions are obtained by signing in through the browser (`riseup login`), which captures cookies and the commit hash from the running web app. Sessions are stored at `~/.config/riseup-cli/session.json` with `0600` permissions.
21+
22+
## Endpoints
23+
24+
### Budget
25+
26+
#### `GET /api/budget/current`
27+
28+
Returns the current month's budget with all envelopes and transactions.
29+
30+
#### `GET /api/budget/{date}/{count}`
31+
32+
Returns budgets starting from a given month.
33+
34+
| Parameter | Type | Example | Description |
35+
|-----------|------|---------|-------------|
36+
| `date` | string | `2026-03` | Year-month (YYYY-MM) |
37+
| `count` | number | `1` | Number of months to fetch |
38+
39+
#### `GET /api/budget/oldest`
40+
41+
Returns the oldest available budget date as plain text (e.g., `2025-05`).
42+
43+
### Balances
44+
45+
#### `GET /api/current-balance`
46+
47+
Returns an array of bank account balances across all connected accounts.
48+
49+
```typescript
50+
interface Balance {
51+
_id: string
52+
accountNumberPiiId: string
53+
customerId: number
54+
balance: number
55+
lastUpdated: string
56+
source: string
57+
credentialsName: string
58+
accountNumberPiiValue?: string
59+
}
60+
```
61+
62+
#### `GET /api/current-credit-card-debt`
63+
64+
Returns an array of credit card debt entries.
65+
66+
```typescript
67+
interface CreditCardDebt {
68+
_id: string
69+
name: string
70+
customerId: number
71+
lastUpdated: string
72+
accountNumberPiiId: string
73+
source: string
74+
amount: number
75+
accountNumberPiiValue?: string
76+
}
77+
```
78+
79+
### Insights and Plans
80+
81+
#### `GET /api/insights/all`
82+
83+
Returns all financial insights (tips, alerts).
84+
85+
```typescript
86+
interface Insight {
87+
insightId: string
88+
insightName: string
89+
budgetDate: string
90+
_id: string
91+
customerId: number
92+
created: string
93+
deliveredAt?: string
94+
snoozed: boolean
95+
views: number
96+
}
97+
```
98+
99+
#### `GET /api/plans`
100+
101+
Returns all savings plans and goals.
102+
103+
### Account
104+
105+
#### `GET /api/credentials-settings`
106+
107+
Returns connected bank and credit card credentials.
108+
109+
```typescript
110+
interface CredentialsSettings {
111+
credentialsConfigurations: CredentialConfig[]
112+
disabledObkSources: string[]
113+
allowNewConnections: boolean
114+
}
115+
116+
interface CredentialConfig {
117+
bankIdentifier: string
118+
name: string
119+
status: string
120+
sourceName: string
121+
credentialsId: string
122+
accounts: CredentialAccount[]
123+
isInvalid: boolean
124+
isOBK: boolean
125+
}
126+
```
127+
128+
#### `GET /api/subscription`
129+
130+
Returns the user's billing subscription details.
131+
132+
```typescript
133+
interface Subscription {
134+
id: string
135+
created: string
136+
customerId: number
137+
provider: string
138+
isFree: boolean
139+
nextPaymentDate: string
140+
previousPaymentDate: string
141+
currency: string
142+
amount: number
143+
status: string
144+
productName: string
145+
canceledAt: string | null
146+
planType: string
147+
}
148+
```
149+
150+
#### `GET /api/subscription-state-simplified`
151+
152+
Returns simplified subscription state.
153+
154+
```typescript
155+
interface SubscriptionState {
156+
since: string
157+
isDormant: boolean
158+
hasAccessToCashflow: boolean
159+
inTrial: boolean
160+
isAutoRenewalOn: boolean
161+
}
162+
```
163+
164+
#### `GET /api/restricted-customer/session-data`
165+
166+
Returns session and customer data including household name and member info.
167+
168+
### Configuration
169+
170+
#### `GET /api/cashflow-start-day`
171+
172+
Returns the day of the month when the budget cycle resets.
173+
174+
#### `GET /api/logged-in/`
175+
176+
Returns `"OK"` as plain text if the session is valid.
177+
178+
## Core Types
179+
180+
### Transaction
181+
182+
The main data unit inside budget envelopes.
183+
184+
```typescript
185+
interface Transaction {
186+
transactionId: string
187+
businessName: string
188+
source: string
189+
billingAmount: number | null
190+
incomeAmount: number | null
191+
originalAmount: number | null
192+
transactionDate: string
193+
billingDate: string
194+
isIncome: boolean
195+
expense: string
196+
isInstallment: boolean
197+
paymentNumber: number | null
198+
totalNumberOfPayments: number | null
199+
trackingCategory?: TrackingCategory
200+
aiEnrichment?: AiEnrichment
201+
rollingCredit: boolean
202+
deleted: boolean
203+
calendarMonth: string
204+
transactionBudgetDate: string
205+
}
206+
```
207+
208+
### Budget
209+
210+
```typescript
211+
interface Budget {
212+
_id: string
213+
envelopes: Envelope[]
214+
excluded: Transaction[]
215+
trackingCategoryMetadata: TrackingCategoryMetadata[]
216+
budgetDate: string
217+
cashflowStartDay: number
218+
commitHash: string
219+
lastUpdatedAt: string
220+
}
221+
```
222+
223+
### Envelope
224+
225+
Envelopes group transactions by category within a budget.
226+
227+
```typescript
228+
interface Envelope {
229+
id: string
230+
originalAmount: number
231+
balancedAmount: number
232+
type: string
233+
actuals: Transaction[]
234+
details: EnvelopeDetails
235+
}
236+
```
237+
238+
### TrackingCategory
239+
240+
Categories used to classify transactions (displayed in Hebrew).
241+
242+
```typescript
243+
interface TrackingCategory {
244+
name: string
245+
id: string
246+
}
247+
248+
interface TrackingCategoryMetadata {
249+
trackingCategoryId: string
250+
budgetDate: string
251+
historyAverage: number
252+
name: string
253+
display: string
254+
trackingCategoryType: string
255+
hasEnvelope: boolean
256+
activated: boolean
257+
}
258+
```
259+
260+
## Client Library
261+
262+
The CLI exposes a `RiseUpClient` class with namespaced methods:
263+
264+
```typescript
265+
// Budget
266+
client.budget.current() // GET /api/budget/current
267+
client.budget.get(date, count) // GET /api/budget/{date}/{count}
268+
client.budget.oldest() // GET /api/budget/oldest
269+
270+
// Account
271+
client.account.balances() // GET /api/current-balance
272+
client.account.creditCardDebt() // GET /api/current-credit-card-debt
273+
client.account.credentials() // GET /api/credentials-settings
274+
client.account.subscription() // GET /api/subscription
275+
client.account.subscriptionState() // GET /api/subscription-state-simplified
276+
client.account.sessionData() // GET /api/restricted-customer/session-data
277+
278+
// Insights and Plans
279+
client.insights.all() // GET /api/insights/all
280+
client.plans.list() // GET /api/plans
281+
282+
// Configuration
283+
client.config.cashflowStartDay() // GET /api/cashflow-start-day
284+
```
285+
286+
## Error Handling
287+
288+
| Status | Error Type | Meaning |
289+
|--------|-----------|---------|
290+
| 401 | `AuthError` | Session expired or invalid. Run `riseup login`. |
291+
| 4xx/5xx | `ApiError` | API returned an error. Includes status code and response. |
292+
| Network failure | `NetworkError` | Could not reach RiseUp servers. |

0 commit comments

Comments
 (0)