TypeScript SDK for the Up Bank API.
pnpm add @jackdevau/up-api
fetch)Create a token in the Up app, then store it in an environment variable:
export UP_API_TOKEN="up:yeah:..."
import { UpClient } from "@jackdevau/up-api";
const client = new UpClient(process.env.UP_API_TOKEN!);
const ping = await client.utils.ping();
console.log(ping.meta.statusEmoji);
| Area | Up API endpoints | SDK methods |
|---|---|---|
| Utilities | GET /util/ping |
client.utils.ping() |
| Accounts | GET /accountsGET /accounts/{id}GET /accounts/{id}/transactions |
client.accounts.list()client.accounts.retrieve(id)client.accounts.listTransactionsByAccount(...) |
| Transactions | GET /transactionsGET /transactions/{id} |
client.transactions.list(...)client.transactions.listAll(...)client.transactions.retrieve(id) |
| Categories | GET /categoriesGET /categories/{id}PATCH /transactions/{id}/relationships/category |
client.categories.list(...)client.categories.retrieveCategory(id)client.categories.categorizeTransaction(...) |
| Tags | GET /tagsPOST /transactions/{id}/relationships/tagsDELETE /transactions/{id}/relationships/tags |
client.tags.list(...)client.tags.addToTransaction(...)client.tags.removeFromTransaction(...) |
| Attachments | GET /attachmentsGET /attachments/{id} |
client.attachments.list(...)client.attachments.retrieve(id) |
| Webhooks | GET /webhooksPOST /webhooksGET /webhooks/{id}DELETE /webhooks/{id}POST /webhooks/{id}/pingGET /webhooks/{id}/logs |
client.webhooks.list(...)client.webhooks.create(...)client.webhooks.retrieve(id)client.webhooks.delete(id)client.webhooks.ping(webhookId)client.webhooks.logs(webhookId, ...) |
RateLimitError for 429 responses.UpApiError for other non-2xx responses.isRateLimitError(...) and isUpApiError(...) are exported type guards.Request/response types are exported from the package root.