Skip to main content

Overview

The Transactions API allows you to manage all financial transactions across your accounts. Transactions represent money movements including expenses, income, transfers, and payments.

List transactions

curl -X GET "https://api.sure.app/v1/transactions?account_id=123&start_date=2024-01-01" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
Retrieve a paginated list of transactions with optional filtering.

Query parameters

page
integer
default:"1"
Page number for pagination
per_page
integer
default:"25"
Number of transactions per page (max 100)
account_id
integer
Filter by single account ID
account_ids
array
Filter by multiple account IDs
category_id
integer
Filter by category ID
category_ids
array
Filter by multiple category IDs
merchant_id
integer
Filter by merchant ID
merchant_ids
array
Filter by multiple merchant IDs
tag_ids
array
Filter by tag IDs
start_date
string
Filter transactions on or after this date (YYYY-MM-DD)
end_date
string
Filter transactions on or before this date (YYYY-MM-DD)
min_amount
number
Filter transactions with amount greater than or equal to this value
max_amount
number
Filter transactions with amount less than or equal to this value
type
string
Filter by transaction type: income or expense
Search in transaction name, notes, and merchant name

Response

transactions
array
Array of transaction objects
pagination
object
Pagination metadata
{
  "transactions": [
    {
      "id": 1001,
      "date": "2024-01-15",
      "amount": "$42.50",
      "amount_cents": 4250,
      "signed_amount_cents": -4250,
      "currency": "USD",
      "name": "Starbucks",
      "notes": "Coffee meeting",
      "classification": "expense",
      "account": {
        "id": 1,
        "name": "Chase Checking",
        "account_type": "depository"
      },
      "category": {
        "id": 5,
        "name": "Food & Drink",
        "classification": "expense",
        "color": "#f97316",
        "icon": "utensils"
      },
      "merchant": {
        "id": 234,
        "name": "Starbucks"
      },
      "tags": [
        {
          "id": 1,
          "name": "Work expense",
          "color": "#3b82f6"
        }
      ],
      "transfer": null,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_count": 150,
    "total_pages": 6
  }
}

Transaction nature

When creating or updating transactions, the nature field determines how the amount is signed:
  • expense or outflow: Amount is stored as positive (money leaving the account)
  • income or inflow: Amount is stored as negative (money entering the account)
The API expects positive amounts in the request and applies the correct sign based on the nature.

Build docs developers (and LLMs) love