Skip to content
GameCoinDocs
Dashboard

OpenAPI document

Download the OpenAPI 3.1 description of the GameCoin API to explore it in a tool, import it into Postman, or generate a typed client.

On this page

What it is

The whole API is described in one OpenAPI 3.1 document: every route, parameter, request body, response and error, with the three ways to authenticate. It is generated from the same contracts the server uses to check requests, so it never drifts from the API.

https://gamecoin.apilow.com/api/v1/openapi.json

The document is public: it needs no key, answers cross-origin requests, has no rate limit, and is cached for five minutes. Its servers entry points at this GameCoin instance, so a tool that imports it sends its requests to the right place.

What is inside

PartWhat it holds
pathsEvery operation of the API reference, grouped by tag
components.schemasThe objects of the API: wallets, ledger entries, orders, packs, errors
components.securitySchemessecretKey (a bearer key gc_sk_…), publishableKey (the X-GameCoin-Key header) and playerToken (a bearer token gc_pt_…)
tagsCatalog, Catalog management, Players, Wallet, Ledger, Inventory, Purchases, Checkouts, Orders, Codes and the three client groups

Each operation says which scheme it needs. A route for your server asks for secretKey; a route for the browser asks for publishableKey, and for playerToken as well when it acts as a player. These are the same rules as Keys and environments.

Use it

Explore it in a tool

Import the address above into Postman, Insomnia, Bruno or any OpenAPI viewer. Create a variable for your secret test key and set it as the bearer token: every server route then works from the tool. Use a gc_sk_test_… key so that payments stay simulated.

Generate TypeScript types

Types for your Node.js or TypeScript project
npx openapi-typescript https://gamecoin.apilow.com/api/v1/openapi.json -o gamecoin-api.d.ts

The Node.js SDK already ships typed results, and is the better choice for a server. The generated file is useful when you call the client API yourself.

Generate a client in another language

A Java client, as an example
npx @openapitools/openapi-generator-cli generate \
  -i https://gamecoin.apilow.com/api/v1/openapi.json \
  -g java \
  -o gamecoin-java

A generated client does not add what the server SDKs add: automatic retries with backoff, an idempotency key on every write, and typed errors. Add them yourself, or call the API through an SDK when your language has one.

Keep it in sync

Fetch the document in your build rather than keeping a copy, and regenerate when it changes. A field the API adds later is ignored by a well-written client, so a new field does not break an old one.

Where next

  • API reference: the same operations, with examples in several languages.
  • Errors: the error shape every response uses.
  • Server SDKs: the five maintained clients.