API conventions
Base URL, authentication, ids, money, timestamps, pagination, filtering, sorting, and exports in the Roots API.
These conventions hold across every Roots API endpoint.
Base URL and authentication
https://api.sandbox.roots.financeEvery endpoint sits under /api/v1: /api/v1/persons, /api/v1/documents, /api/v1/accounts, /api/v1/counterparties, /api/v1/transfers, /api/v1/fee-rules, /api/v1/fees, /api/v1/billing, /api/v1/scopes, and in sandbox /api/v1/sandbox. Every request carries a bearer token:
curl https://api.sandbox.roots.finance/api/v1/accounts \
-H "Authorization: Bearer $ROOTS_API_TOKEN"See Authentication for issuing tokens.
Ids
Every object id carries a type prefix. An object's own id is always id, and a field named <object>_id refers to another object, for example person_id on an account. An id that belongs to another client returns 404, never 403.
| Object | Prefix |
|---|---|
| Person | person_ |
| Association | assoc_ |
| Account | acct_ |
| Counterparty | cpty_ |
| Transfer | xfer_ |
| Transaction | txn_ |
| Document | doc_ |
| Fee charge | fee_ |
| Webhook event | evt_ |
| Webhook endpoint | whep_ |
Money
Amounts are integers in the currency's minor units, sent and returned as JSON strings, in fields whose names end in _minor:
{"amount_minor": "125000", "currency": "usd"}That is 1,250.00 USD. Parse amounts as integers, never as floats. usd is the only currency, with two minor-unit digits.
Timestamps
Timestamps are ISO 8601 with a UTC offset, for example 2026-08-10T12:00:00+00:00. Date-only filters (created_from, created_to) are whole UTC days and inclusive.
Request ids
Every response carries an X-Request-ID header. Send your own X-Request-ID and Roots echoes it back. Quote it when you contact support.
Pagination
List endpoints are page-based.
| Parameter | Default | Constraint |
|---|---|---|
page | 1 | At least 1. |
page_size | 20 | From 1 through 100. |
Every list response uses this envelope:
{
"data": [],
"page": 1,
"page_size": 20,
"total": 137
}More results exist while page * page_size < total. A page_size above 100 is a 422 with code validation.
Filtering
Filters are query parameters named after the field they match, for example status, status_detail, person_id, account_id, or direction. Several filters combine with AND. Enum filters accept exactly the values in the API reference; an unknown value is a 422.
search is a case-insensitive substring match on the list's name and id columns, up to 200 characters.
curl "https://api.sandbox.roots.finance/api/v1/transfers?direction=withdrawal&status=failed&page_size=50" \
-H "Authorization: Bearer $ROOTS_API_TOKEN"On GET /api/v1/fees, search matches the start of a fee id or part of a fee rule's or customer's name, repeating event_type matches any of several event types, and from and to (an ISO date or a datetime with a UTC offset, inclusive) bound occurred_at.
Sorting
GET /persons, /accounts, /counterparties, and /transfers take order_by and order. order is asc or desc; the default is order_by=created_at&order=desc. Empty values sort last in both directions, and every sort has a unique tiebreaker, so a row never appears on two pages.
| Endpoint | order_by values |
|---|---|
GET /persons | name, type, status, created_at, updated_at |
GET /accounts | person_name, currency, status, created_at, active_at |
GET /counterparties | name, counterparty_type, person_name, status, created_at |
GET /transfers | source, destination, rail, amount, currency, status, created_at |
Exports
GET /persons/export, /accounts/export, /counterparties/export, and /transfers/export take the same filters, search, and sort as the matching list, and return the whole matching set as a file attachment instead of a page.
| Parameter | Meaning |
|---|---|
format | csv (default) or pdf. |
columns | The fields to include. Defaults to all. |
created_from, created_to | A created-at window of at most one year. |
A matching set larger than the export ceiling is refused with a 400, never truncated. Narrow the filters and export again.
Enum values
Every enum value is lower snake_case, for example active, withdrawal, account, counterparty, ach, sameday_ach, individual, or ultimate_beneficial_owner. Values are case-sensitive and must be sent exactly as the API reference lists them; any other spelling is a 422.
Next steps
- Read Errors for the error format and codes.
- Read Idempotency before you create resources or transfers.
Updated 18 days ago