API Reference
This section is a per-resource reference for the Enjin Platform GraphQL API. Each page focuses on one resource family (accounts, collections, tokens, transactions, marketplace listings, fuel tanks, token groups, nomination pools) and walks through the queries and mutations available for it.
https://platform.beta.enjin.io/graphql
How this section is organised
- Queries — read on-chain and platform state: transactions, collections, tokens, accounts, fuel tanks, marketplace, token groups, nomination pools.
- Mutations — submit on-chain actions and manage platform-side resources: transactions, collections, tokens, wallets, fuel tanks, marketplace, token groups, nomination pools.
- Important Arguments — a glossary of recurring argument types and enum values (
network,chain,state,cap, etc.) used throughout the API.
If you're new to GraphQL or to the Enjin API, start with Using the Enjin API and the How to Use GraphQL primer — they cover authentication, the playground, and operation structure.
Two top-level shapes worth knowing
Two things are common to almost every example in this reference and worth understanding before you read them.
1. network and chain arguments
Every operation that touches the blockchain takes a network and a chain argument:
network: ENJIN(mainnet) ornetwork: CANARY(testnet).chain: MATRIX(Matrixchain — collections, tokens, marketplace) orchain: RELAY(Relaychain — staking, governance).
A single endpoint serves both networks and both chains; you select which to target on each request.
2. CreateTransaction — one mutation for every on-chain action
Almost every on-chain action — creating a collection, minting tokens, transferring, listing on the marketplace, bonding to a nomination pool — is submitted through the single CreateTransaction mutation. The specific action is selected by which field is set on the transaction input.
For example, creating a token looks like this:
mutation {
CreateTransaction(
network: ENJIN
chain: MATRIX
transaction: {
createToken: {
recipient: "efRecipientAddress"
collectionId: 12345
tokenId: 1
initialSupply: 10
listingForbidden: false
infusion: 0
anyoneCanInfuse: false
}
}
) {
uuid
action
state
}
}
The same mutation handles mintToken, transferToken, createCollection, createListing, and ~40 other actions — see Transaction Mutations for the full surface and Important Arguments for the shapes returned.
The GraphQL Query Builder section walks through using the GraphiQL Explorer to build queries and mutations interactively.