Prerequisites
Before starting, make sure you have:- An API key from the Bags Developer Portal.
- A Solana wallet with SOL for transaction fees, rent, and applicable reimbursements.
- A quote with an available DBC configuration in Supported Custom Quote Tokens.
- A balance of that quote token if you want an initial buy. You can also omit the buy.
- A signer and RPC connection that support the requested transaction format. The examples request
v0.
https://public-api-v2.bags.fm/api/v1 and the x-api-key header.
1. Pick a Quote and Configuration
Fetch Supported Custom Quote Tokens withflow=dbc:
response.tokens and the flow: "dbc" entry in each token’s flows array:
asset.mintandasset.tokenProgramidentify the quote. Keep both when constructing requests.asset.decimalsdescribes raw units; do not assume nine decimals when it is unavailable.profileEligibledescribes the mint’s current compatibility with DBC.launchAvailability.statusmust be"available"; inspectreasonotherwise. Catalog inclusion alone does not guarantee that the mint is currently usable.configslists the availableconfigTypevalues and theirgraduationThresholdRaw. Select one entry and pass itsconfigTypeasbagsConfigTypewhen creating the Fee Share config.
reviewedForLaunch is retained for compatibility and marks a built-in or admin-configured entry; use configs and live availability to make your selection.
graduationThresholdRaw is a decimal string of raw quote units, not a USD amount. For a six-decimal quote, "85000000" represents 85 unscaled quote tokens. An issuer’s display multiplier may change the displayed quantity. Bags admins set this threshold; public config and launch requests do not accept a threshold override.
For custom quotes, the selected type keeps its base-token supply, trading fee rates, liquidity distribution, vesting, and fee scheduler. Fees are collected only in the quote token before and after graduation, with no fee compounding, including types whose names contain “Compounding.” See Customize Token Fees for the supported types.
2. Create Token Metadata
Use the existing Create Token Info endpoint:response.tokenMint as TOKEN_MINT and response.tokenMetadata as METADATA_URI. Create the Fee Share config before launching this mint. The launch’s metadata URI must fit within 200 UTF-8 bytes.
3. Create the Fee Share Config
Call Create Custom Quote Fee Share Config Plan. This example selects the Default configuration and allocates the entire normal recipient pool to your wallet. Use theconfigType you selected in step 1 as bagsConfigType:
flow to dbc and keep the same quote for the later launch request.
Omitting bagsConfigType selects Default. The exact quote/Default entry must exist; the server does not fall back to another configured type. Default uses a one-billion-base-token supply; the Default with 1K Supply type uses 1,000 base tokens.
Normal recipient allocations must total 10,000 BPS, with 1–100 unique recipients. They divide the recipient pool after platform, partner, and deployer deductions. To include a partner, pass both partner and its matching partnerConfig. Set admin to the intended config manager, especially when sharing fees among multiple recipients.
The config response contains:
Config plans may contain multiple stages. Confirm them in order. If lookup-table setup is required, complete that setup and fetch the plan again with its lookup-table addresses as described in the transaction-plan guide. Setup confirmation alone does not mean the config is ready for launch.
The issued config keeps a snapshot of its launch parameters. Later admin changes to the quote’s configuration affect newly issued configs only. Continue an interrupted launch with the original request and returned config addresses; a refreshed discovery listing does not replace its issued terms.
4. Build the Launch Plan
After config creation is confirmed, call Create Custom Quote DBC Launch Plan:configKey is the meteoraConfigKey returned by config creation, not the Fee Share config address. This launch starts on DBC and retains its Fee Share configuration after graduation to DAMM v2.
initialBuyQuoteRaw is a decimal string of raw quote units, not SOL lamports or a floating-point token amount. The examples perform no initial buy. To buy, supply a positive raw amount backed by your wallet’s quote balance; Bags does not automatically swap SOL into that quote.
5. Sign, Send, and Confirm
The launch endpoint returns the plan directly asresponse, whereas config creation wraps it in response.plan. Follow Transaction Plans to preserve server signatures, respect stage dependencies, and handle lookup-table readiness.
Save the base mint, config addresses, request, and each transaction signature. If submission becomes uncertain, reconcile the original signature and on-chain state before requesting a replacement. Do not rerun metadata creation to resume an interrupted launch.
After confirmation, use Claim Custom Quote Fees for recipient, holding, and shared role balances. Fees remain in the original quote asset, subject to its token transfer fees; no automatic SOL or USDC conversion takes place.
6. Update Recipients Later
The config manager can call Create Custom Quote Fee Share Config Update Plan withbaseMint, payer, claimersArray, and basisPointsArray. This also returns a plan directly as response.
The update changes recipient allocations while preserving the quote asset. Unpaid recipient entries must be settled before removal. Holding balances remain withdrawable by their owner after removal from the config. Follow the returned stages without skipping lock, update, or finalization steps.
