Demo docs: examples are illustrative.
Referral API

Reporting API

Query program performance, balances, and the ledger with GraphQL.

The reporting API is read-heavy and built for dashboards and finance tools. Ask for exactly the fields you need, across programs, in one request.

Endpoint
POST https://api.referralapi.example/graphql

Authenticate with a secret or restricted key, the same way as the REST API.

Example

query Balances {
  balances {
    currency
    unlocked
    pending
  }
}
Response
{
  "data": {
    "balances": [{ "currency": "usd", "unlocked": 12000, "pending": 4000 }]
  }
}

Limits

Queries are scored by complexity. Each field costs 1 point, and each list multiplies the cost of its children by its first argument. A single query can cost up to 10,000 points.

Browse the operations in the sidebar. Every page includes the full type signature, an example, and a playground.

How is this guide?

On this page