# Quickstart (external API)

## 1. Get an API key

Sign in at https://formsight.com.au → create an API key in the app.  
The raw key is shown **once**. Store it securely.

## 2. Confirm balance

```bash
curl -s https://formsight.com.au/api/v1/me \
  -H "Authorization: Bearer $FORMSIGHT_API_KEY"
```

## 3. Generate ABA from JSON (recommended)

```bash
curl -X POST https://formsight.com.au/api/v1/generate-json \
  -H "Authorization: Bearer $FORMSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "processing_date": "2026-06-30",
    "description": "JUNE PAYRUN",
    "profile_id": 12,
    "payments": [
      {
        "payee_name": "Jane Smith",
        "bsb": "062-174",
        "account_number": "12345678",
        "amount": 1234.56,
        "reference": "PAYROLL",
        "employee_id": "EMP001"
      }
    ]
  }' \
  -o output.aba
```

You may supply an inline `payer` object instead of `profile_id` (exactly one of the two).

**Cost:** 5 tokens on success.

## 4. Optional free check

```bash
curl -X POST https://formsight.com.au/api/v1/check \
  -H "Authorization: Bearer $FORMSIGHT_API_KEY" \
  -F "file=@output.aba"
```

## Excel alternative

1. `GET /api/v1/template` — download signed `ABA_template.xlsx`  
2. Fill the Payments sheet  
3. `POST /api/v1/generate` with `profile_id`, `processing_date`, and `file`  

## Next

- [API Reference](https://formsight.com.au/docs/api-reference.md)
- [Errors](https://formsight.com.au/docs/errors.md)
- [Go-live checklist](https://formsight.com.au/docs/go-live.md)
