R2 Developers
R2 Connect API

Authentication & scopes

How each request is authenticated and what each permission the business owner grants you means.

How to send the key#

Every request carries the access key. Two equivalent forms are accepted; use whichever suits your HTTP client:

bash
# Option 1 — Authorization header (recommended)
curl -H "Authorization: Bearer r2k_a1b2c3d4..." "https://api.r2-os.com/api/connect/v1/account"

# Option 2 — x-api-key header
curl -H "x-api-key: r2k_a1b2c3d4..." "https://api.r2-os.com/api/connect/v1/account"

All keys start with r2k_. Each key belongs to a single business: you do not need — and cannot — specify which business you are requesting data for. R2 determines it from the key.

Available scopes#

The owner picks the scopes when creating the key. If you try to read a resource without its scope, the response is 403 and nothing else. Always ask for the minimum your integration needs: that is what earns trust at authorization time.

ScopeGrants access toContains
read:reservations/reservationsLodging stays with dates, guests, charges and balance
read:orders/ordersAll transactions, from any vertical
read:payments/paymentsCharges, method and provider
read:guests/guestsCustomer directory with spending history
read:items/itemsCatalog with prices

The /account resource requires no scope: any valid key can query it, and its response includes a scopes list with what that key may actually read. Use it when your integration starts, to adjust what you will request.

Lifetime and revocation#

Protect the key

A key grants access to real commercial and personal data of a business. Store it in your server’s secret manager, never in a repository, in browser code or in a mobile app. All requests must originate from your server.