Axerity Docs
API

Quickstarts

End-to-end scripts for the two most common API use cases.

Two copy-paste-runnable scripts.

Post your first transaction

export AX_KEY="ax_live_…"

# 1. List your chart of accounts to grab account IDs.
curl -H "Authorization: Bearer $AX_KEY" \
  https://axerity.com/api/v1/accounts | jq '.data[] | { id, code, name }'

# 2. Post a $1,200 sale: debit Cash, credit Service Revenue.
curl -X POST https://axerity.com/api/v1/transactions \
  -H "Authorization: Bearer $AX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "2026-05-24",
    "memo": "Hosting sale — Acme Co",
    "reference": "INV-1024",
    "lines": [
      { "account": "01HW…CASH",    "debit":  "1200.00" },
      { "account": "01HW…REVENUE", "credit": "1200.00" }
    ]
  }'

# 3. Pull the income statement.
curl -H "Authorization: Bearer $AX_KEY" \
  https://axerity.com/api/v1/reports/income_statement

Upload a file

export AX_KEY="ax_live_…"
FILE="./contract.pdf"
SIZE=$(stat -c%s "$FILE")

# 1. Initiate.
RESP=$(curl -s -X POST https://axerity.com/api/v1/files \
  -H "Authorization: Bearer $AX_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"name\": \"contract.pdf\",
    \"content_type\": \"application/pdf\",
    \"size_bytes\": \"$SIZE\"
  }")

FILE_ID=$(echo $RESP | jq -r .id)
URL=$(echo $RESP | jq -r .upload.url)

# 2. Upload bytes directly to S3.
curl -X PUT "$URL" \
  -H "Content-Type: application/pdf" \
  -H "x-amz-server-side-encryption: AES256" \
  --data-binary @"$FILE"

# 3. Finalize.
curl -X POST "https://axerity.com/api/v1/files/$FILE_ID/finalize" \
  -H "Authorization: Bearer $AX_KEY"

What's coming

  • Idempotency keys — retry safety for POST.
  • Webhookstransaction.created, file.uploaded, etc.
  • Scope enforcementbooks:read, files:write, etc. wired up to actual permission checks.
  • Test-mode dataset isolationax_test_ keys hit a separate sandbox.

On this page