Quickstart

Get your first Spendaq classification response in under 10 minutes. This guide covers getting an API key, making your first POST /v1/classify call, and reading the response.

Prerequisites

  • A Spendaq account — sign up here (Starter tier is free)
  • An API key from your dashboard
  • curl, Node.js, or Python

Authentication

All Spendaq API requests require a Bearer token in the Authorization header. Your API key is prefixed with spq_live_ for production or spq_test_ for the test environment.

Authorization: Bearer spq_test_YOUR_KEY_HERE

Your first classification call

Send a batch of transactions to the classify endpoint. Each transaction object needs at minimum: id, amount_cents, merchant_name, and raw_category.

curl

curl -X POST https://api.spendaqo.com/v1/classify \
  -H "Authorization: Bearer spq_test_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "acct_test_001",
    "transactions": [
      {
        "id": "txn_001",
        "amount_cents": 8499,
        "date": "2026-06-10",
        "merchant_name": "AMZN*MKTP",
        "raw_category": "DEBIT_MISC"
      }
    ]
  }'

Node.js

const response = await fetch('https://api.spendaqo.com/v1/classify', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer spq_test_YOUR_KEY_HERE',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    account_id: 'acct_test_001',
    transactions: [{
      id: 'txn_001',
      amount_cents: 8499,
      date: '2026-06-10',
      merchant_name: 'AMZN*MKTP',
      raw_category: 'DEBIT_MISC',
    }],
  }),
});
const data = await response.json();
console.log(data.results[0].corrected_category); // "Office Supplies"

Reading the response

A successful 200 OK response looks like this:

{
  "status": 200,
  "latency_ms": 142,
  "results": [
    {
      "id": "txn_001",
      "corrected_category": "Office Supplies",
      "confidence_score": 0.97,
      "original_category": "DEBIT_MISC"
    }
  ],
  "forecast_signal": "stable_positive",
  "forecast_horizon_days": 90,
  "forecast_confidence": 0.83
}

Key response fields

  • corrected_category — the Spendaq-assigned category label
  • confidence_score — ML confidence (0.0–1.0). Scores below 0.7 indicate uncertain classifications
  • forecast_signal — one of: stable_positive, stable_negative, improving, declining, volatile
  • latency_ms — total processing time for this request

Next steps

  • Full API Reference — all endpoints, request fields, error codes
  • Webhooks — subscribe to real-time classification events
  • SDKs — official Node.js and Python SDKs

Questions? Email [email protected] or call +1 (704) 853-2941.