> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bags.fm/llms.txt
> Use this file to discover all available pages before exploring further.

# Create custom quote Fee Share config plan

> Create (or fetch) a fee sharing config denominated in any supported quote mint, not just wrapped SOL. Returns a staged transaction plan: sign and send the entries in `response.plan.transactions` in order. If `response.plan.readiness.status` is `setup_required`, confirm the setup transaction(s) first, then call this endpoint again to fetch the rebuilt plan. `response.needsCreation` is false once the config already exists on-chain, in which case `response.plan` is null.

For non-WSOL DBC issuance, the exact quote mint and `bagsConfigType` must have an admin-saved configuration; select from `flows[].configs` in `/token-launch/supported-quote-tokens`. Omission selects Default, with no fallback to another type. A missing pair returns `quote_not_reviewed`. The graduation threshold comes from that configuration, not a public request argument. Issued launch parameters remain unchanged by later admin edits. Omitted or explicit WSOL keeps built-in settings.

For non-WSOL DBC launches, select an exact quote and `configType` from [Supported Custom Quote Tokens](/api-reference/get-supported-quote-tokens), then pass that type as `bagsConfigType`. Omitting it selects Default and requires a saved Default entry for the quote. A missing pair returns `quote_not_reviewed`.

Graduation thresholds come from the selected configuration; this request does not accept a threshold override. Issuance saves the launch parameters so later admin updates cannot change an already-issued launch.

See [Launch a Token with a Custom Quote](/how-to-guides/launch-token-non-sol-quote) for the complete bonding-curve workflow.


## OpenAPI

````yaml POST /fee-share/config/v2
openapi: 3.1.0
info:
  title: Bags Public API v2
  description: API endpoints for Bags platform
  version: 2.0.0
  contact:
    name: Bags Support
    url: https://support.bags.fm
servers:
  - url: https://public-api-v2.bags.fm/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Token Launch
    description: Endpoints for creating and managing token launches
  - name: Fee Share
    description: Endpoints for managing fee sharing configs
  - name: Fee Share Admin
    description: >-
      Endpoints for fee share admin operations including listing, transferring
      admin authority, and updating configs
  - name: Analytics
    description: Endpoints for retrieving token analytics and metadata
  - name: Fee Claiming
    description: Endpoints for claiming fees from various sources
  - name: State
    description: Endpoints for retrieving on-chain state and derived state
  - name: Trade
    description: Endpoints for getting trade quotes and executing token swaps
  - name: Partner
    description: Endpoints for managing partner configurations and claiming partner fees
  - name: Solana
    description: Endpoints for direct Solana blockchain interactions
  - name: EVM
    description: Endpoints for reading Bags EVM token data
  - name: Robinhood Chain
    description: Read endpoints for Bags V2 tokens on Robinhood Chain (chain id 4663)
  - name: Dexscreener
    description: >-
      Endpoints for managing Dexscreener token info orders, payments, and image
      uploads
  - name: Auth
    description: Endpoints for retrieving authenticated user information
  - name: Agent
    description: Endpoints for AI agent wallet-signature authentication (V2)
paths:
  /fee-share/config/v2:
    post:
      tags:
        - Fee Share
      summary: Create custom quote Fee Share config creation plan
      description: >-
        Create (or fetch) a fee sharing config denominated in any supported
        quote mint, not just wrapped SOL. Returns a staged transaction plan:
        sign and send the entries in `response.plan.transactions` in order. If
        `response.plan.readiness.status` is `setup_required`, confirm the setup
        transaction(s) first, then call this endpoint again to fetch the rebuilt
        plan. `response.needsCreation` is false once the config already exists
        on-chain, in which case `response.plan` is null.


        For non-WSOL DBC issuance, the exact quote mint and `bagsConfigType`
        must have an admin-saved configuration; select from `flows[].configs` in
        `/token-launch/supported-quote-tokens`. Omission selects Default, with
        no fallback to another type. A missing pair returns
        `quote_not_reviewed`. The graduation threshold comes from that
        configuration, not a public request argument. Issued launch parameters
        remain unchanged by later admin edits. Omitted or explicit WSOL keeps
        built-in settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteConfigRequest'
      responses:
        '200':
          description: Successfully fetched or built the fee share config plan
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/QuoteFeeShareConfigResponse'
        '400':
          description: >-
            Bad request - invalid parameters, wallets, BPS values (must sum to
            10,000), missing quote/config-type entry (quote_not_reviewed), or
            unsupported asset profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    QuoteConfigRequest:
      allOf:
        - $ref: '#/components/schemas/QuoteBuildOptionsRequest'
        - type: object
          properties:
            baseMint:
              type: string
              description: Public key of the base mint (the token being launched)
            payer:
              type: string
              description: Public key of the wallet funding config creation
            flow:
              type: string
              enum:
                - dbc
                - damm_v2_direct
              description: Which custom quote launch flow this config is for
            claimersArray:
              type: array
              items:
                type: string
                description: Public key of a fee claimer wallet
              description: >-
                Array of fee claimer wallet public keys. Must align with
                basisPointsArray, be unique, and contain 1-100 entries.
              minItems: 1
              maxItems: 100
            basisPointsArray:
              type: array
              items:
                type: number
                minimum: 0
                maximum: 10000
                description: Basis points allocated to the corresponding claimer
              description: >-
                Array of basis points for each fee claimer. Must align with
                claimersArray and total 10,000.
              minItems: 1
              maxItems: 100
            quoteMint:
              type: string
              description: >-
                Optional: public key of the quote mint this config is
                denominated in. Defaults to wrapped SOL. Cannot be changed once
                the config is issued.
              nullable: true
            quoteTokenProgram:
              type: string
              description: >-
                Optional: public key of the SPL token program that owns
                quoteMint (Token or Token-2022)
              nullable: true
            partner:
              type: string
              description: >-
                Optional: public key of the partner wallet for partner fee
                sharing
              nullable: true
            partnerConfig:
              type: string
              description: >-
                Optional: public key of the partner config PDA (required if
                partner is provided)
              nullable: true
            admin:
              type: string
              description: >-
                Optional: public key of the config manager. Defaults to
                whichever claimer holds 10,000 bps.
              nullable: true
            bagsConfigType:
              $ref: '#/components/schemas/MeteoraConfigType'
              description: >-
                Optional: DBC configuration type. For a non-WSOL quote, select a
                configType returned in that quote's flows[].configs. Omission
                selects Default and requires that exact quote/Default entry; a
                missing pair returns quote_not_reviewed. The issued parameters
                are retained if an admin later updates the quote configuration.
              nullable: true
            enableFirstSwapWithMinFee:
              type: boolean
              description: >-
                Optional: when true, the first swap on the new pool pays the
                minimum (ending) base fee instead of the starting cliff fee.
                Only affects config types that use a base-fee scheduler.
              nullable: true
            tipWallet:
              type: string
              description: 'Optional: base58 encoded public key of the tip recipient wallet'
              nullable: true
            tipLamports:
              type: number
              description: 'Optional: tip amount in lamports'
              nullable: true
          required:
            - baseMint
            - payer
            - flow
            - claimersArray
            - basisPointsArray
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        response:
          description: ''
      required:
        - success
    QuoteFeeShareConfigResponse:
      type: object
      properties:
        contractVersion:
          type: number
          enum:
            - 1
        needsCreation:
          type: boolean
          description: >-
            Whether a plan still needs to be signed and sent (true), or the
            config is already fully created on-chain (false)
        feeShareConfig:
          type: string
          description: Public key of the fee share config account
        feeShareAuthority:
          type: string
          description: Public key of the fee share authority
        asset:
          $ref: '#/components/schemas/QuoteAsset'
        flow:
          type: string
          enum:
            - dbc
            - damm_v2_direct
        meteoraConfigKey:
          type:
            - string
            - 'null'
          description: >-
            Public key of the derived upstream Meteora DBC config, or null for
            damm_v2_direct/legacy configs
        plan:
          description: >-
            Staged transaction plan to sign and send, or null when needsCreation
            is false because the config already exists on-chain
          oneOf:
            - $ref: '#/components/schemas/QuoteTransactionPlan'
            - type: 'null'
      required:
        - contractVersion
        - needsCreation
        - feeShareConfig
        - feeShareAuthority
        - asset
        - flow
        - meteoraConfigKey
        - plan
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Error message
      required:
        - success
        - error
    QuoteBuildOptionsRequest:
      type: object
      properties:
        transactionFormat:
          type: string
          enum:
            - v0
            - v1
          description: 'Optional: requested transaction wire format. Defaults to v0.'
          nullable: true
        feeLimits:
          type: array
          items:
            $ref: '#/components/schemas/QuoteFeeLimit'
          description: >-
            Optional: signed token transfer-fee schedule ceilings. Defaults to
            the observed active schedule; a higher execution-time rate or cap
            fails the bounded transaction. Maximum 4 entries.
          maxItems: 4
          nullable: true
        additionalLookupTables:
          type: array
          items:
            type: string
            description: Public key of a lookup table address
          description: >-
            Optional: extra address lookup tables to compile the transactions
            against. Maximum 8 entries.
          maxItems: 8
          nullable: true
    MeteoraConfigType:
      type: string
      enum:
        - fa29606e-5e48-4c37-827f-4b03d58ee23d
        - d16d3585-6488-4a6c-9a6f-e6c39ca0fda3
        - a7c8e1f2-3d4b-5a6c-9e0f-1b2c3d4e5f6a
        - 48e26d2f-0a9d-4625-a3cc-c3987d874b9e
        - 810faadb-030b-47de-a68b-7211c1cbbee3
        - e2963a6c-441a-4862-9d80-b94e3a481cd7
        - ba28db46-ea6f-4452-8218-5587f6aca0a1
      default: fa29606e-5e48-4c37-827f-4b03d58ee23d
      description: >-
        Bags config type that determines the token's fee structure. The
        thresholds and compounding percentages below describe SOL-quoted
        launches.


        - `fa29606e-5e48-4c37-827f-4b03d58ee23d` (Default): 2% fees both pre and
        post migration, with 25% fee compounding post-migration. Graduates at
        ~85 SOL.

        - `d16d3585-6488-4a6c-9a6f-e6c39ca0fda3`: 0.25% fees pre-migration, 1%
        post-migration, with 50% fee compounding post-migration. Graduates at
        ~85 SOL.

        - `a7c8e1f2-3d4b-5a6c-9e0f-1b2c3d4e5f6a`: 1% fees pre-migration, 0.25%
        post-migration, with 50% fee compounding post-migration. Graduates at
        ~85 SOL.

        - `48e26d2f-0a9d-4625-a3cc-c3987d874b9e`: 10% fees both pre and post
        migration, with 50% fee compounding post-migration. Graduates at ~85
        SOL.

        - `810faadb-030b-47de-a68b-7211c1cbbee3` (2% Flat, 85% Locked): 2% fees
        both pre and post migration, with 25% fee compounding post-migration.
        85% of token supply is locked. Graduates at ~100 SOL.

        - `e2963a6c-441a-4862-9d80-b94e3a481cd7` (Default, 1K Supply): Same as
        Default (2% fees pre and post migration, 25% fee compounding
        post-migration) but with a 1,000 token supply. Graduates at ~85 SOL.

        - `ba28db46-ea6f-4452-8218-5587f6aca0a1` (2% Base, 96% Locked): 2% base
        fee pre-migration, with 25% fee compounding post-migration. 96% of token
        supply is locked. Post-migration the fee is market-cap based, starting
        at 2% and decaying to a 0.5% floor as the token's market cap grows (~25x
        graduation market cap). Graduates at ~80 SOL.


        For non-WSOL DBC launches, select a type returned in the quote's
        `flows[].configs` from `/token-launch/supported-quote-tokens`. Its saved
        `graduationThresholdRaw` replaces the SOL threshold, and fees are
        collected only in the quote token with zero compounding before and after
        graduation. The 85%-locked type is unavailable for non-WSOL. Omitting
        the type selects Default; the exact quote/type pair must be configured.
    QuoteAsset:
      type: object
      properties:
        mint:
          type: string
          description: Public key of the asset mint
        tokenProgram:
          type: string
          description: >-
            Public key of the SPL token program that owns this mint (Token or
            Token-2022)
        decimals:
          type:
            - number
            - 'null'
          description: >-
            Decimals configured on the mint, or null when it could not be
            observed
      required:
        - mint
        - tokenProgram
        - decimals
    QuoteTransactionPlan:
      description: >-
        A staged, potentially multi-transaction plan for a custom quote
        operation. Sign and send the entries in `transactions` in order; if
        `readiness.status` is `setup_required`, confirm the setup transaction(s)
        first, then call this endpoint again to fetch the rebuilt plan.
      type: object
      properties:
        contractVersion:
          type: number
          enum:
            - 1
          description: Version of the quote transaction plan contract
        operation:
          $ref: '#/components/schemas/QuoteOperation'
        asset:
          $ref: '#/components/schemas/QuoteAsset'
        feeLimits:
          type: array
          items:
            $ref: '#/components/schemas/QuoteFeeLimit'
          description: Fee limits that were applied while building this plan
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/QuoteTransactionStage'
          description: >-
            Ordered transaction stages to sign and send. Empty when
            readiness.status is setup_required and the lookup table is still
            warming up.
        readiness:
          $ref: '#/components/schemas/QuoteTransactionReadiness'
      required:
        - contractVersion
        - operation
        - asset
        - feeLimits
        - transactions
        - readiness
    QuoteFeeLimit:
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/QuoteAssetRef'
        basisPoints:
          type: number
          minimum: 0
          maximum: 10000
          description: >-
            Ceiling on the active token transfer-fee rate, in basis points.
            Checked independently from maximumFeeRaw.
        maximumFeeRaw:
          type: string
          description: >-
            Ceiling on the active token transfer-fee schedule cap, as a decimal
            string to support bigint (raw u64 units). This is not an aggregate
            fee budget.
      required:
        - asset
        - basisPoints
        - maximumFeeRaw
    QuoteOperation:
      description: What this transaction plan accomplishes.
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - config
            baseMint:
              type: string
            flow:
              type: string
              enum:
                - dbc
                - damm_v2_direct
          required:
            - kind
            - baseMint
            - flow
        - type: object
          properties:
            kind:
              type: string
              enum:
                - manager_update
            baseMint:
              type: string
            flow:
              type: string
              enum:
                - dbc
                - damm_v2_direct
          required:
            - kind
            - baseMint
            - flow
        - type: object
          properties:
            kind:
              type: string
              enum:
                - launch
            baseMint:
              type: string
            flow:
              type: string
              enum:
                - dbc
                - damm_v2_direct
          required:
            - kind
            - baseMint
            - flow
        - type: object
          properties:
            kind:
              type: string
              enum:
                - holding_claim
            baseMint:
              type: string
            wallet:
              type: string
            authority:
              type: string
          required:
            - kind
            - baseMint
            - wallet
            - authority
        - type: object
          properties:
            kind:
              type: string
              enum:
                - position_claim
            baseMint:
              type: string
            wallet:
              type: string
          required:
            - kind
            - baseMint
            - wallet
    QuoteTransactionStage:
      type: object
      properties:
        id:
          type: string
          description: Identifier for this stage, unique within the plan
        kind:
          type: string
          enum:
            - config
            - claim
            - manager_update
            - launch
            - lookup_table_setup
          description: What this stage's transaction does
        dependsOn:
          type: array
          items:
            type: string
          description: Ids of stages that must land before this one can be submitted
        format:
          type: string
          enum:
            - v0
            - v1
          description: Selected wire format for this stage's transaction
        encoding:
          type: string
          enum:
            - base64
          description: Encoding of the transaction field
        transaction:
          type: string
          description: Base64 encoded transaction, partially signed where required
        messageSha256:
          type: string
          description: Hex-encoded SHA-256 hash of the transaction's unsigned message bytes
        requiredSigners:
          type: array
          items:
            type: string
          description: >-
            All public keys required to sign, including signers whose signatures
            may already be present. Preserve existing signatures and add missing
            ones.
        lifetime:
          type: object
          properties:
            blockhash:
              type: string
              description: Recent blockhash the transaction was built against
            lastValidBlockHeight:
              type: string
              description: >-
                Last block height for which the blockhash is valid, as a
                string-encoded amount
          required:
            - blockhash
            - lastValidBlockHeight
        budget:
          type: object
          properties:
            computeUnitLimit:
              type: number
              description: Compute unit limit requested for this transaction
            loadedAccountsDataSizeLimit:
              type: number
              description: >-
                Loaded accounts data size limit requested for this transaction,
                in bytes
            priorityFee:
              description: >-
                Priority fee for this stage's transaction. The unit depends on
                the selected transaction format: v1 stages report a total
                lamport amount, v0 stages report a
                micro-lamports-per-compute-unit rate.
              oneOf:
                - type: object
                  properties:
                    unit:
                      type: string
                      enum:
                        - total_lamports
                    amount:
                      type: string
                      description: >-
                        Total priority fee in lamports, as a string-encoded
                        amount
                  required:
                    - unit
                    - amount
                - type: object
                  properties:
                    unit:
                      type: string
                      enum:
                        - micro_lamports_per_compute_unit
                    amount:
                      type: string
                      description: >-
                        Priority fee rate in micro-lamports per compute unit, as
                        a string-encoded amount
                  required:
                    - unit
                    - amount
          required:
            - computeUnitLimit
            - loadedAccountsDataSizeLimit
            - priorityFee
        size:
          type: object
          properties:
            bytes:
              type: number
              description: Serialized transaction size in bytes
            accounts:
              type: number
              description: Number of accounts referenced by the transaction
            signatures:
              type: number
              description: Number of signatures required by the transaction
          required:
            - bytes
            - accounts
            - signatures
      required:
        - id
        - kind
        - dependsOn
        - format
        - encoding
        - transaction
        - messageSha256
        - requiredSigners
        - lifetime
        - budget
        - size
    QuoteTransactionReadiness:
      description: >-
        Whether the plan's transactions are ready to send, or whether an address
        lookup table needs to be created/warmed up first.
      oneOf:
        - type: object
          properties:
            status:
              type: string
              enum:
                - ready
          required:
            - status
        - type: object
          properties:
            status:
              type: string
              enum:
                - setup_required
            lookupTables:
              type: array
              items:
                type: string
              description: Lookup table address(es) involved in the setup step
            minimumSlotExclusive:
              type:
                - string
                - 'null'
              description: >-
                Slot after which the lookup table can be relied on, as a
                string-encoded amount, or null while it is still being created
            action:
              type: string
              enum:
                - confirm_setup_refetch_and_rebuild
              description: >-
                Confirm the setup transaction(s) in `transactions`, then call
                this endpoint again to fetch the rebuilt plan
          required:
            - status
            - lookupTables
            - minimumSlotExclusive
            - action
    QuoteAssetRef:
      type: object
      properties:
        mint:
          type: string
          description: Public key of the asset mint
        tokenProgram:
          type: string
          description: >-
            Public key of the SPL token program that owns this mint (Token or
            Token-2022)
      required:
        - mint
        - tokenProgram
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication. Provide your API key as the header value.

````