Token Launcher
API Reference: https://api.play.fun/api-reference
Authentication
Token launcher endpoints require user authentication via Privy. The user must have an embedded Solana wallet with delegation enabled and sufficient SOL balance.
Launch Endpoints
Launch a Playcoin
POST /token-launcher/launch 🔒
Queue a playcoin launch for a game. The launch executes asynchronously — use the returned jobId to poll for status.
Headers:
Content-Type: application/json
Authorization: Bearer <privy-auth-token>Request Body:
{
"gameId": "550e8400-e29b-41d4-a716-446655440000",
"emissionDays": 30,
"buyAmount": "100000000",
"gameCoinSymbol": "AWESOME"
}Body Parameters:
gameId
string (UUID)
Yes
The game to launch a playcoin for
emissionDays
number
Yes
Emission schedule duration. Must be 7 or 30
buyAmount
string
No
Initial buy amount in lamports (1 SOL = 1,000,000,000 lamports). Buys tokens at launch price on the bonding curve
gameCoinSymbol
string | null
No
Custom ticker symbol for the playcoin. If not provided, one is generated from the game name
Response (200 — launch queued):
Response (200 — launch already in progress):
Error Responses:
400
Invalid emissionDays value
"Invalid emissionDays value. Allowed values are: 7, 30"
400
Game already has an active playcoin
"Game already has an active gamecoin (TokenMint...). Please wait until the current gamecoin emissions are complete before launching another."
400
Insufficient SOL balance
"Insufficient SOL balance in embedded wallet to cover transaction fees and buy amount. Please ensure at least 0.07 SOL is available."
403
Launch restricted to game owner during grace period
"Only the creator or owner (if ownership is validated) of the game can launch tokens within this period."
404
Game not found
"Game with ID ... not found"
JavaScript Example:
Notes:
The launch requires approximately 0.07 SOL for transaction fees, plus any
buyAmountOnly one playcoin can be active per game at a time
After a playcoin's emission ends, the game creator/owner gets a 48-hour grace period before external launchers can launch the next one
The
gameCoinSymbolmust be unique if provided
Get Launch Status
GET /token-launcher/launch/{jobId}
Poll the status of an in-progress playcoin launch.
Path Parameters:
jobId(required) — The job ID returned from the launch endpoint
Response (completed):
Response (in progress):
Response (failed):
Response Fields:
status
string
Job state: "completed", "active", "waiting", "failed"
progress
number
Progress percentage (0–100)
bundleTx
string
Solana transaction signature (only on completion)
gtokenAddress
string
The minted playcoin token address (only on completion)
message
string
Human-readable status message
error
string
Error description (only on failure)
JavaScript Example:
Notes:
Poll every 2–5 seconds
A typical launch completes in ~30 seconds
The
progressfield updates during the launch process (10% → 50% → 80% → 100%)
Complete Launch
POST /token-launcher/complete-launch
Finalize a launch by verifying on-chain state and creating the token record. This is called automatically by the launch job but can be retried manually if needed.
Request Body:
Body Parameters:
gtokenAddress
string
Yes
The Solana token mint address of the launched playcoin
Response (success):
Response (already completed):
Response (failure):
Snapshot Endpoints
These endpoints support airdrop functionality for playcoins launched with an airdropTokenAddress configured on the game.
Get Snapshot Summary
GET /token-launcher/snapshot/{tokenMint}
Get the merkle snapshot summary for a token, including the merkle root and holder count.
Path Parameters:
tokenMint(required) — The token mint address used for the airdrop snapshot
Response (success):
Response (not found):
Get User Merkle Proof
GET /token-launcher/snapshot/{tokenMint}/proof/{userAddress}
Get a specific user's merkle proof for claiming their airdrop allocation.
Path Parameters:
tokenMint(required) — The token mint addressuserAddress(required) — The user's Solana wallet address
Response (success):
Response (not found):
Get Snapshot Holders
GET /token-launcher/snapshot/{tokenMint}/holders
Get the full list of holders included in a snapshot.
Path Parameters:
tokenMint(required) — The token mint address
Response (success):
Response (not found):
Exercise Claim Endpoints
These endpoints allow holders of a game's airdrop token to claim their playcoin allocation.
Build Exercise Claim Transactions
POST /token-launcher/exercise-claim/build-transactions
Build the Solana transactions needed for a user to claim their airdrop allocation.
Request Body:
Body Parameters:
gtokenAddress
string
Yes
The playcoin token mint address
participant
string
Yes
The claimer's Solana wallet address
referrer
string
No
Referrer wallet address (for referral tracking)
blockhash
string
No
A recent Solana blockhash. If not provided, one is fetched automatically
Response:
Get Claim Status
GET /token-launcher/exercise-claim/{gtokenAddress}/status/{wallet}
Check whether a wallet is eligible to claim airdrop tokens and the current claim status.
Path Parameters:
gtokenAddress(required) — The playcoin token mint addresswallet(required) — The user's Solana wallet address
Response:
Full Launch Flow Example
Error Responses
All endpoints may return the following error responses:
400 Bad Request:
401 Unauthorized:
403 Forbidden:
404 Not Found:
Last updated