Getting Started
The GraphQL API is deprecated for merchants. Merchants should build new integrations on the current version of the Refersion REST API (v2026-08) — see the API Reference. GraphQL for marketplace affiliates is not affected.
This is a Beta API and is subject to change.
Endpoint
Unlike Refersion's REST API which has a variety of endpoints, the GraphQL API has a single endpoint:
POST https://graphql.refersion.com
Authentication
The GraphQL API requires an access token for making authenticated requests.
Getting your access token
Refersion merchants can obtain an access token by logging into the Refersion merchant app and
navigating to Settings → Refersion API Keys → Refersion GraphQL Token (the
/settings/integrations/api-keys settings page), where you can generate, copy, and revoke your
account's GraphQL token.
If you are a Refersion Marketplace user you can follow these instructions to generate a GraphQL token.
Making your first query
You can access the GraphQL API endpoint using cURL or any other HTTP client. For the following test
example, make sure to replace <YOUR_ACCESS_TOKEN> with the token you obtained from the
Authentication section.
curl
To make a query using curl, send a POST request with your query as the JSON payload.
curl -X POST \
"https://graphql.refersion.com" \
-H "X-Refersion-Key: <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"query": "{ offers { name commission type } }"}'
Example Query
The -d payload above sends this GraphQL query, which lists every offer with its name, commission,
and type:
{
"query": "{ offers { name commission type } }"
}
Related
- Schema Reference — every query, type, field and argument, with the fields your token can and cannot see.
- Filtering and Sorting — how filters,
sortand page size behave. - Explore Refersion GraphQL using Voyager — visualize the schema as a graph.
- Call Limits — the per-account request limits and response caching.
- Pagination — fetch result sets larger than one page.