Skip to main content

Getting Started

Deprecated for merchants

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.

info

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 } }"
}