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.finance

Every 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.

ObjectPrefix
Personperson_
Associationassoc_
Accountacct_
Counterpartycpty_
Transferxfer_
Transactiontxn_
Documentdoc_
Fee chargefee_
Webhook eventevt_
Webhook endpointwhep_

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.

ParameterDefaultConstraint
page1At least 1.
page_size20From 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.

Endpointorder_by values
GET /personsname, type, status, created_at, updated_at
GET /accountsperson_name, currency, status, created_at, active_at
GET /counterpartiesname, counterparty_type, person_name, status, created_at
GET /transferssource, 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.

ParameterMeaning
formatcsv (default) or pdf.
columnsThe fields to include. Defaults to all.
created_from, created_toA 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.

Did this page help you?