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

# Confirm Token Launch

> POST /confirm-launch - Submit signed transaction to complete token launch

## Overview

Receives a user-signed transaction from `/launch`, adds the protocol's signature, and submits the complete transaction to the Solana blockchain to finalize the token launch.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.zcombinator.io/confirm-launch \
    -H "Content-Type: application/json" \
    -d '{
      "signedTransaction": "4MzR7dxJNJRVP1Q6k7Y3j8X...",
      "baseMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "metadataUrl": "https://gateway.pinata.cloud/ipfs/QmX7Y3j8...",
      "name": "My Token",
      "symbol": "MTK",
      "payerPublicKey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
    }'
  ```

  ```javascript fetch theme={null}
  const response = await fetch('https://api.zcombinator.io/confirm-launch', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      signedTransaction: signedTransactionBase58,
      baseMint: result.baseMint,
      metadataUrl: result.metadataUrl,
      name: "My Token",
      symbol: "MTK",
      payerPublicKey: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
    })
  });

  const confirmResult = await response.json();
  ```

  ```python requests theme={null}
  import requests

  data = {
      "signedTransaction": signed_transaction_base58,
      "baseMint": result["baseMint"],
      "metadataUrl": result["metadataUrl"],
      "name": "My Token",
      "symbol": "MTK",
      "payerPublicKey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
  }

  response = requests.post(
      'https://api.zcombinator.io/confirm-launch',
      json=data,
      headers={'Content-Type': 'application/json'}
  )

  result = response.json()
  ```
</CodeGroup>

## Request Parameters

<ParamField body="signedTransaction" type="string" required>
  Base58 encoded transaction signed by the user's wallet
</ParamField>

<ParamField body="baseMint" type="string" required>
  Token mint address returned from `/launch`
</ParamField>

<ParamField body="name" type="string" required>
  Token name (must match the value used in `/launch`)
</ParamField>

<ParamField body="symbol" type="string" required>
  Token symbol (must match the value used in `/launch`)
</ParamField>

<ParamField body="payerPublicKey" type="string" required>
  Public key of the transaction payer (must match the value used in `/launch`)
</ParamField>

<ParamField body="metadataUrl" type="string">
  Metadata URL returned from `/launch` (optional but recommended)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the operation was successful
</ResponseField>

<ResponseField name="transactionSignature" type="string">
  The Solana transaction signature/hash
</ResponseField>

<ResponseField name="baseMint" type="string">
  The confirmed token mint address
</ResponseField>

<ResponseField name="metadataUrl" type="string">
  The metadata URL for the token
</ResponseField>

<ResponseField name="confirmation" type="object">
  Blockchain confirmation details
</ResponseField>

### Success Response

```json theme={null}
{
  "success": true,
  "transactionSignature": "5VfYiDvQMBSWxKJLa9NLPQ1x3...",
  "baseMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "metadataUrl": "https://gateway.pinata.cloud/ipfs/QmX7Y3j8...",
  "confirmation": {
    "slot": 123456789,
    "confirmationStatus": "confirmed"
  }
}
```

## Error Responses

<AccordionGroup>
  <Accordion title="400 - Missing Required Fields">
    ```json theme={null}
    {
      "error": "Missing required fields"
    }
    ```
  </Accordion>

  <Accordion title="400 - Token Keypair Not Found">
    ```json theme={null}
    {
      "error": "Token keypair not found. Please call /launch first."
    }
    ```

    This occurs when:

    * Too much time has passed since calling `/launch`
    * Invalid `baseMint` provided
  </Accordion>

  <Accordion title="500 - Transaction Failed">
    ```json theme={null}
    {
      "error": "Failed to confirm launch"
    }
    ```

    This can occur due to:

    * Network congestion
    * Insufficient funds for transaction fees
    * Invalid transaction signature
    * Blockchain errors
  </Accordion>
</AccordionGroup>

## Process Flow

This endpoint completes the two-phase token launch process:

<Steps>
  <Step title="Retrieve Keypair">
    Fetches the stored token keypair using the provided `baseMint`
  </Step>

  <Step title="Deserialize Transaction">
    Converts the Base58 signed transaction back to a Solana Transaction object
  </Step>

  <Step title="Add Protocol Signature">
    Signs the transaction with the protocol's token keypair (mint authority)
  </Step>

  <Step title="Submit to Blockchain">
    Sends the fully signed transaction to the Solana network
  </Step>

  <Step title="Wait for Confirmation">
    Monitors the transaction until it's confirmed on-chain
  </Step>

  <Step title="Record Launch">
    Stores the successful launch for the claims system
  </Step>

  <Step title="Cleanup">
    Removes the temporary keypair after successful launch
  </Step>
</Steps>

## Rate Limiting

This endpoint is subject to rate limiting:

* **8 requests per IP** per 2-minute window
* Returns HTTP 429 when limit exceeded

## Security Notes

<Warning>
  **Important Security Considerations:**

  * The transaction must be signed by the same wallet used in `/launch`
  * Protocol adds the final signature but users maintain control of their funds
  * Token keypairs are automatically cleaned up after successful launch
  * All launches are recorded for audit trails
</Warning>

## After Launch

Once your token is successfully launched:

1. **Verify Creation**: Use [`/verify-token`](/api-reference/utility/verify-token) to confirm
2. **Check Claims**: View eligibility with [`/claims/:tokenAddress`](/api-reference/claims/eligibility)
3. **Monitor Health**: Use [`/health`](/api-reference/utility/health) for system status

## Transaction Signature

The returned `transactionSignature` can be used to:

* View the transaction on Solana explorers
* Verify the token creation on-chain
* Track the transaction status
* Provide proof of launch to users

Example Solana Explorer URL:

```
https://explorer.solana.com/tx/${transactionSignature}
```
