> ## 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 Launch

> Launch a token on Meteora DBC or Raydium LaunchLab in one call. The backend validates the request, resolves the fee claimers, pins the metadata, reserves a mint and answers the launch as a short list of **version 1** transactions it has already signed, usually exactly one. Sign each with the launcher without changing it, send it base64 through [Send Transaction](/api-reference/send-transaction) with `encoding: "base64"`, and wait for it to confirm before sending a stage that depends on it. Nothing is on chain until you send them.

Check [Get Launch Options](/api-reference/get-launch-options) for the protocols, quote tokens and modes it takes right now. If anything fails after a mint is reserved (an expired blockhash, a failed send, a 5xx), call again with the same body plus the returned `tokenMint`: you get fresh transactions for whatever has not landed. See [Launch a Token](/how-to-guides/launch-token) for the full flow.



## OpenAPI

````yaml POST /launch
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 V2
    description: >-
      One-call token launch on Meteora or Raydium LaunchLab, and the options it
      takes
  - 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: BagsPay
    description: >-
      Endpoints for reading where a token's creator fees are paid out, its
      payout history, claims and payment events, and for changing its payout
      handle
  - name: Auth
    description: Endpoints for retrieving authenticated user information
  - name: Agent
    description: Endpoints for AI agent wallet-signature authentication (V2)
paths:
  /launch:
    post:
      tags:
        - Token Launch V2
      summary: Create launch
      description: >-
        Launch a token on Meteora DBC or Raydium LaunchLab in one call. The
        backend validates the request, resolves the fee claimers, pins the
        metadata, reserves a mint and answers the launch as a short list of
        **version 1** transactions it has already signed, usually exactly one.
        Sign each with the launcher without changing it, send it base64 through
        [Send Transaction](/api-reference/send-transaction) with `encoding:
        "base64"`, and wait for it to confirm before sending a stage that
        depends on it. Nothing is on chain until you send them.


        Check [Get Launch Options](/api-reference/get-launch-options) for the
        protocols, quote tokens and modes it takes right now. If anything fails
        after a mint is reserved (an expired blockhash, a failed send, a 5xx),
        call again with the same body plus the returned `tokenMint`: you get
        fresh transactions for whatever has not landed. See [Launch a
        Token](/how-to-guides/launch-token) for the full flow.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LaunchRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LaunchMultipartRequest'
      responses:
        '200':
          description: Launch built; sign and send `response.transactions` in order
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/LaunchResponse'
        '400':
          description: >-
            Bad request - schema failure, bps not summing to 10,000, not exactly
            one image source, an unusable image or metadata URI, a claimer or
            partner that does not resolve, an option the protocol does not take
            (`unsupported_option`), or a first transaction that fails
            simulation, usually a launcher short of SOL (`simulation_failed`).
            See `errorCode`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - a Bags Payout handle was refused (`payout_refused`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchErrorResponse'
        '404':
          description: >-
            Not found - resume with a `tokenMint` that has no launch or belongs
            to another user (`launch_not_found`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchErrorResponse'
        '409':
          description: >-
            Conflict - the token already launched or its fee config on chain
            differs from the request (`launch_conflict`), or another call for
            the same mint is in progress (`pending_reconciliation`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchErrorResponse'
        '500':
          description: >-
            Internal server error. Carries `tokenMint` when a mint was already
            reserved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchErrorResponse'
        '503':
          description: >-
            Service unavailable - a claimer lookup, the chain or the mint pool
            could not be reached, or Raydium launches are paused
            (`raydium_tier_changed`). Retry; resume with `tokenMint` when one
            was returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    LaunchRequest:
      type: object
      description: >-
        Body of `POST /launch`. Sent as JSON, or as the `payload` part (a JSON
        string) of a multipart request whose `image` part holds the image file.
        Unknown fields are refused.
      properties:
        launchProtocol:
          $ref: '#/components/schemas/LaunchProtocol'
        wallet:
          type: string
          description: >-
            The launcher: signs the transactions, pays the rent, the fees and
            the initial buy, and is the fee share deployer
        token:
          $ref: '#/components/schemas/LaunchTokenInput'
        feeClaimers:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/LaunchFeeClaimer'
          description: >-
            1 to 100 fee claimers whose `bps` sum to 10,000. They split what is
            left after the platform share, the partner share (with a partner)
            and the deployer (launcher) share.
        quoteMint:
          type: string
          nullable: true
          description: >-
            Quote mint. Default SOL. Meteora only: one of the protocol's
            `quoteTokens` from [Get Launch
            Options](/api-reference/get-launch-options), and the quote must
            accept `mode`.
        initialBuyAmount:
          type: string
          nullable: true
          description: >-
            Initial buy in raw units of the quote mint (lamports for SOL), as a
            decimal string to support bigint. A non-SOL buy is paid from the
            launcher's existing quote token account. On Raydium it must be large
            enough to buy at least one token unit.
        mode:
          type: string
          nullable: true
          description: >-
            Meteora config type id from the options' `modes`. Name it on every
            Meteora launch: when it is omitted the backend's default mode
            applies. Not accepted on Raydium.
        partner:
          type: object
          nullable: true
          description: >-
            Partner for this launch: either a `refCode` (or `@username`) or the
            partner `wallet`. The partner config must already exist on chain.
          properties:
            refCode:
              type: string
              nullable: true
              description: Partner ref code, or a Bags username prefixed with `@`
            wallet:
              type: string
              nullable: true
              description: Partner wallet address
          required: []
        manager:
          type: string
          nullable: true
          description: >-
            Wallet allowed to change the fee claimers later. Without it, a
            claimer at 10,000 bps becomes the manager; Bags bot wallets cannot
            be the manager.
        dividendProfile:
          type: array
          nullable: true
          minItems: 1
          maxItems: 10
          description: >-
            Meteora with SOL only: tokens the dividend bot buys with its fees.
            Include the dividend bot among `feeClaimers`.
          items:
            type: object
            properties:
              mint:
                type: string
                description: Token mint, not the launched token
              bps:
                type: integer
                description: Share in basis points; the shares sum to 10,000
            required:
              - mint
              - bps
        tip:
          type: object
          nullable: true
          description: >-
            Optional SOL transfer from the launcher, for callers that send
            through their own relay or bundle. It goes in the last transaction.
          properties:
            wallet:
              type: string
              description: Tip recipient
            lamports:
              type: integer
              minimum: 0
              description: Tip amount in lamports
          required:
            - wallet
            - lamports
        tokenMint:
          type: string
          nullable: true
          description: >-
            Only to resume a launch you started: the `tokenMint` an earlier
            response or error returned. Send the same body plus this field.
      required:
        - launchProtocol
        - wallet
        - token
        - feeClaimers
    LaunchMultipartRequest:
      type: object
      description: Multipart form of `POST /launch`, for an image file.
      properties:
        payload:
          type: string
          description: >-
            The `LaunchRequest` body as a JSON string, at most 100,000
            characters
        image:
          type: string
          format: binary
          description: 'Token image: JPEG, PNG, GIF or WebP, at most 10 MB'
      required:
        - payload
        - image
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        response:
          description: ''
      required:
        - success
    LaunchResponse:
      type: object
      properties:
        contractVersion:
          type: integer
          enum:
            - 1
          description: Version of this response shape, not of the transactions
        launch:
          type: object
          properties:
            tokenMint:
              type: string
              description: 'The reserved mint. Keep it: resuming the launch needs it.'
            launchProtocol:
              $ref: '#/components/schemas/LaunchProtocol'
            quoteMint:
              type: string
              description: Quote mint of the launch
            metadataUri:
              type: string
              description: Metadata URI the launch puts on chain
            status:
              type: string
              enum:
                - PRE_LAUNCH
              description: >-
                Always `PRE_LAUNCH` here; it moves on once the launch
                transaction lands
          required:
            - tokenMint
            - launchProtocol
            - quoteMint
            - metadataUri
            - status
        feeShare:
          type: object
          properties:
            config:
              type: string
              description: Fee share config address of the token
            manager:
              type: string
              nullable: true
              description: Fee share manager, or null for none
            claimers:
              type: array
              description: >-
                Claimers in request order with their resolved wallets; handle
                entries keep `platform` and `username`
              items:
                type: object
                properties:
                  wallet:
                    type: string
                    description: Claimer wallet
                  bps:
                    type: integer
                    description: Share in basis points
                  platform:
                    type: string
                    nullable: true
                    description: Platform of a handle entry
                  username:
                    type: string
                    nullable: true
                    description: Handle of a handle entry
                required:
                  - wallet
                  - bps
          required:
            - config
            - manager
            - claimers
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/LaunchTransactionStage'
          description: >-
            Usually one `launch:0`. Up to 3 for 100 claimers: one or two
            `config` stages, then `launch`. Send them in order, waiting for each
            to confirm, or as one Jito bundle (base64).
      required:
        - contractVersion
        - launch
        - feeShare
        - transactions
    LaunchErrorResponse:
      type: object
      description: >-
        A refused or failed launch. When a mint was already reserved,
        `tokenMint` is set: retry with it rather than starting over.
      properties:
        success:
          type: boolean
          example: false
        response:
          type: string
          description: What went wrong, in words
        errorCode:
          type: string
          nullable: true
          enum:
            - invalid_request
            - claimer_not_found
            - duplicate_claimer
            - partner_not_found
            - image_invalid
            - metadata_invalid
            - unsupported_option
            - payout_refused
            - simulation_failed
            - unauthorized
            - launch_not_found
            - launch_conflict
            - pending_reconciliation
            - claimer_lookup_unavailable
            - mint_unavailable
            - rpc_unavailable
            - raydium_tier_changed
          description: Machine-readable reason; absent on an unexpected 500
        tokenMint:
          type: string
          nullable: true
          description: The mint reserved before the error; resume the launch with it
      required:
        - success
        - response
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Error message
      required:
        - success
        - error
    LaunchProtocol:
      type: string
      enum:
        - meteora
        - raydium
      description: >-
        Launchpad the token launches on: `meteora` (Meteora DBC) or `raydium`
        (Raydium LaunchLab).
    LaunchTokenInput:
      type: object
      description: >-
        The token's metadata. Give exactly one image source across the request:
        an `image` file part (multipart only), `imageUrl`, or a ready
        `metadataUri`.
      properties:
        name:
          type: string
          description: Token name, 1 to 32 UTF-8 bytes
        symbol:
          type: string
          description: >-
            Token symbol, 1 to 10 UTF-8 bytes. `BAGS` and `FINN` are reserved in
            any case.
        description:
          type: string
          nullable: true
          description: Up to 2,000 characters. Required unless `metadataUri` is given.
        twitter:
          type: string
          nullable: true
          description: >-
            X link, up to 500 characters. An empty string counts as absent.
            Required (an x.com link) when BagsPay is a fee claimer.
        telegram:
          type: string
          nullable: true
          description: Telegram link, up to 500 characters
        website:
          type: string
          nullable: true
          description: Website, up to 500 characters
        imageUrl:
          type: string
          nullable: true
          description: >-
            https image URL, up to 2,048 characters. Fetched once (https on
            every redirect, public addresses only, at most 5 MB, within 10 s);
            JPEG, PNG, GIF or WebP.
        metadataUri:
          type: string
          nullable: true
          description: >-
            A ready metadata JSON URI: https, up to 200 UTF-8 bytes, put on
            chain as given. Its name and symbol are not checked against the
            request.
      required:
        - name
        - symbol
    LaunchFeeClaimer:
      type: object
      description: >-
        One fee claimer: either `wallet`, or `platform` and `username`. A Bags
        Payout platform (`venmo`, `cashapp`, `xmoney`) pays the fees out to that
        handle and must be the only claimer, at 10,000 bps (Meteora with SOL
        only).
      properties:
        wallet:
          type: string
          nullable: true
          description: Solana wallet address of the claimer
        platform:
          type: string
          nullable: true
          enum:
            - twitter
            - tiktok
            - kick
            - github
            - moltbook
            - domain
            - venmo
            - cashapp
            - xmoney
          description: >-
            Social platform whose username resolves to a claimer wallet, or a
            Bags Payout platform. A handle with no Bags account gets a new
            wallet it can claim later.
        username:
          type: string
          nullable: true
          description: >-
            Handle on `platform`. A leading `@` is dropped; social handles are
            lowercased and at most 100 characters.
        bps:
          type: integer
          minimum: 1
          maximum: 10000
          description: >-
            Share of the claimers' pool in basis points. Shares sum to exactly
            10,000 across `feeClaimers`.
      required:
        - bps
    LaunchTransactionStage:
      type: object
      description: >-
        One launch transaction, already signed by the backend. Sign it with the
        launcher without changing the message, and send it once the stages in
        `dependsOn` have confirmed.
      properties:
        id:
          type: string
          description: >-
            `<kind>:<position>`, e.g. `launch:0`, or `config:0`, `config:1`,
            `launch:2` when the claimers do not fit one transaction
        kind:
          type: string
          enum:
            - config
            - launch
          description: >-
            `config` adds fee claimers; `launch` creates the mint and the pool
            and makes the initial buy
        dependsOn:
          type: array
          items:
            type: string
          description: >-
            Ids that must confirm before this one is sent: the previous stage,
            or none
        format:
          type: string
          enum:
            - v1
          description: >-
            Solana transaction version. Version 1 cannot be decoded by
            `@solana/web3.js` 1.x; use `@solana/kit`.
        encoding:
          type: string
          enum:
            - base64
          description: Encoding of `transaction`
        transaction:
          type: string
          description: >-
            Partially signed wire. Do not alter the message or drop the existing
            signatures.
        messageSha256:
          type: string
          description: Hex SHA-256 of the message bytes; check it before signing
        requiredSigners:
          type: array
          items:
            type: string
          description: 'Signers whose signature is still missing: only the launcher'
        lifetime:
          type: object
          description: The blockhash the transaction expires with
          properties:
            blockhash:
              type: string
              description: Recent blockhash
            lastValidBlockHeight:
              type: string
              description: >-
                Last block height the transaction can land at, as string to
                support bigint
          required:
            - blockhash
            - lastValidBlockHeight
      required:
        - id
        - kind
        - dependsOn
        - format
        - encoding
        - transaction
        - messageSha256
        - requiredSigners
        - lifetime
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication. Provide your API key as the header value.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.