Skip to main content
Prefer the terminal? The visor CLI does these steps with visor auth login and visor tx add.
1

Create a token

Open Settings > Connected apps in Visor and find the Personal API card.
  1. Give the token a name you will recognize, such as Spending spreadsheet.
  2. Choose what the token can do. Choose Read and record transactions, because this quickstart records an expense.
  3. Choose how long it is valid: 30, 90 (default), or 365 days. Never expires is also available, but a token with an expiry is safer.
  4. Select Create token and copy the value that starts with visor_pat_.
Visor shows the token only once. Store it in a password manager or a secret store. If you lose it, revoke it and create a new one.
2

Store the token in an environment variable

Keep the token out of source code, URLs, and logs.
3

List your spaces

The response lists every space you own or were invited to:
Use a space id to scope later requests to that space.
4

Find an account and a category

Replace SPACE_ID with an id from the previous step:
Copy the id of the account that paid the expense, and the id of its category. A system category has a stable key, such as category.food_and_drinks, so a script can find it by key. See Spaces and reference data.
5

Record an expense

The response is 201 Created with the new transaction. The amount is a decimal string, and the transaction takes the currency of its account:
6

Retry safely

Send the same request again with the same Idempotency-Key. Visor does not record a second expense: it returns the expense it already has, with the header idempotent-replayed: true. Your script can retry a timeout without creating duplicates. See Idempotency.
7

See it in Visor

Open Transactions in Visor. The expense is in the account and the space you chose.

Next steps