MUTATE
// Documentation

Docs

API reference

All write routes check the request origin. Unless noted, write routes need a wallet session cookie and are rate limited per wallet or client. Errors return { "error": string, "code": string } with an HTTP status.

Launch

POST /api/launch/begin

No session needed. Rate limited to 10 per hour per client. Multipart form:

FieldNotes
fileArtwork, PNG, JPEG or WebP
walletThe launching wallet address
name, ticker, descriptionToken identity
quoteMintOptional; must be in the curated quote list
creatorFeeBps0 to 500 in steps of 25; default 0
devBuyAmountOptional amount of the quote asset to buy with in the same launch (see Launch and lifecycle)
creatorFeeRecipientOptional wallet; stored for future fee claiming
website, x, telegram, discordOptional links

Returns 201 with { tokenId, transactionId, serializedTransaction, preview, lastValidBlockHeight }, plus serializedTransactions (config first, then pool and buy) when a dev buy was requested. The token is saved as a hidden draft.

GET /api/launch/limits?quoteMint=

No session needed; 60 per minute per client. Returns { quoteSymbol, graduationTarget, devBuyMax, rules } for the chosen pair (rules: mutationFeeUsd, identityVoteMinutes, identityCooldownHours, identityDelayHours, present even when the pair's numbers are null), so the incubator can disable dev buy amounts above the cap. All three are null when the target cannot be worked out right now (for example no price for a non-SOL pair); the server still enforces the cap when the launch is prepared.

POST /api/launch/confirm

Rate limited to 60 per minute per client. Body { transactionId, signature }. The initiating browser must send its HTTP-only launch cookie, set by /api/launch/begin. The cookie binds a random secret to this prepared transaction through a stored SHA-256 hash and expires after one hour. Alternatively, an independently authenticated session for the recorded creator permits recovery of older records or a lost cookie. A public signature alone never authenticates its fee payer.

Confirmation reconciles the exact prepared transaction and requires the verified launch state to be live before publishing or issuing a creator session. Failed, expired, mismatched, or incompletely verified launches never issue sessions. Returns { tokenId, wallet }, or { error, code: "LAUNCH_PENDING" } with status 202 while confirmation is pending. Successful confirmation clears the launch cookie. Missing or incorrect browser evidence without a matching creator session returns 401 LAUNCH_BROWSER_MISMATCH.

Tokens

RoutePurpose
GET /api/tokensLaunched (indexed) tokens only
GET /api/tokens/[id]One token, including launchState and mutation: { graduated, feePaid, unlocked, feeUsdCents }
POST /api/tokens/[id]/[action]Mutation actions: proposals, support, vote, freeze, settle, next-round. Refused with 409 MUTATION_LOCKED or MUTATION_FEE_UNPAID until the token is unlocked
POST /api/tokens/[id]/metadata-upgradesCreate a Forge upgrade. Same gate. Proposing it (/api/metadata-upgrades/[id]/propose) is refused with 429 PROPOSAL_COOLDOWN if another change was proposed for the token in the last 24 hours. A holder vote lasts 10 minutes. GET on this route also returns rules with the live numbers
GET /api/tokens/[id]/chainLive chain state for the token
POST /api/tokens/[id]/trade, /quotePrepare trades and quote a trade
POST /api/tokens/[id]/migrateQueue protocol-funded graduation, returning 202 with signingRequired: false. No wallet transaction is returned. The worker also scans independently of this endpoint.
POST /api/tokens/[id]/claim-feesPrepare a claim of the creator's unclaimed trading fees. Creator wallet only. Returns the transaction to sign, then submit through /api/onchain/transactions/submit
POST /api/tokensOlder creation route. Needs a session. The incubator uses /api/launch/* instead

Quote assets

GET /api/quote-assets?query=&category=

Returns { assets, categories, degraded } from the curated list (SOL, USDC, stocks). query filters the list locally by symbol or name. category is all, solana, currencies or stocks. Limited to 120 per minute per client. degraded is true when the list is stale or partial.

Market data

RoutePurpose
GET /api/tokens/[id]/candles?interval=Price candles (1m, 5m, 15m, 1h, 1d; default 5m) built from indexed trades, with stats (lastPrice, change24h, volume24h, trades24h). Prices and volume are in the token's quote asset. Public; 120 per minute per client
GET /api/tokens/[id]/trades?limit=The latest buys and sells, newest first (up to 100)

Both read the trades table the worker fills. A token with no trades returns empty lists.

Comments

RoutePurpose
GET /api/tokens/[id]/commentsThe token's comments, newest first. Public; 120 per minute per client. Returns { comments: [{ id, wallet, text, at }] }
POST /api/tokens/[id]/commentsPost a comment. Body { text }. Needs a session; 6 per minute per wallet. Refused with 409 NOT_LAUNCHED before the token has launched, and 400 COMMENT_REFUSED for repeats, long text or too many links
DELETE /api/tokens/[id]/comments?commentId=Delete your own comment (403 for anyone else's)

Comments expire 3 hours after posting.

Creator

GET /api/creator

Needs a session. Returns { wallet, tokens, feesStatus } for the signed-in wallet: each launched token with quote, creatorFeeBps, recipient and fees: { unclaimed, claimed } (raw amounts), or fees: null and feesStatus: "rpc-unavailable" when the pool cannot be read.

GET /api/search?query=

No session needed; 60 per minute per client. Finds launched tokens by contract address (a full address or any part of one, base58 characters only). An empty query returns the latest launches. Returns { results } with up to 8 tokens, each with id, name, ticker, description, mint, launchState, image, currentGeneration, quote, creatorFeeBps, socialLinks and generations[].

Archive

GET /api/archive

Returns { specimens, identityChanges } for launched tokens. Each specimen has id, name, ticker, mint, launchState, createdAt, currentGeneration, currentImage and generations[].

$MUTATE and the mutation fee

The pre-token public release uses MANUAL_CHANGES_FEE_POLICY=waived-until-mutate with no configured MUTATE_TOKEN_MINT. Uploaded replacement artwork and manual name, ticker, description and full identity changes have no platform fee. Network fees and trading fees still apply. Graduation, creator authorization, holder approval, timelocks and cooldowns remain enforced.

POST /api/metadata-upgrades/[upgradeId]/execute prepares an approved manual update during this waiver. Requires same-origin requests, a creator session and enabled network execution. Returns { transactionId, serializedTransaction, lastValidBlockHeight, preview }. The wallet signs and broadcasts, then submits { transactionId, signature } through /api/onchain/transactions/submit. Confirmation uses the existing transaction/history flow. This endpoint creates no $MUTATE quote or burn.

RoutePurpose
POST /api/mutate/burn/quoteQuote a burn. Body { actionType, targetId } where actionType is metadata-upgrade-execution or mutation-activation (then targetId is the token id)
POST /api/mutate/burn/[id]/prepareBuild the unsigned burn transaction
POST /api/mutate/burn/[id]/submitRecord the signature and reconcile. Body { signature }
GET /api/mutate, /api/mutate/burns$MUTATE status and public burn history

Wallet auth

RoutePurpose
POST /api/auth/challengeGet a plain-text sign-in message for a wallet (site, wallet, nonce, issued and expiry times). It is not in the formal Sign-In With Solana layout, because wallets like Phantom refuse to show that layout if it is slightly off
POST /api/auth/verifySubmit the signed message and receive the session cookie
GET /api/auth/session, DELETE /api/auth/sessionRead or end the session

Other routes

/api/dashboard, /api/uploads, /api/media/[id], /api/metadata/[id], /api/metadata/upgrades/[id], /api/metadata-upgrades/[upgradeId]/[action], /api/onchain/launch/prepare, /api/onchain/transactions/[id], /api/onchain/transactions/submit, /api/status, and the /api/treasury/* routes (revenue, expenses, allocations, buybacks) cover the dashboard, media, metadata, the older launch preparation path, health and the treasury ledger.