# Create

Use this endpoint to create a rune launchpad

{% hint style="info" %}

* Creating a rune launchpad requires a pre-payment for splitting the rune tokens
* The pre-payment details are in the `charge` field returned by the endpoint
* You will also need to send us the premined tokens, the address and amount for the premined tokens are in the `tokenCharge` field
* Make sure to send the bitcoin pre-payment in a **single** transaction and UTXO
* Make sure to send the rune transfer in a **single** transfer transaction
* After bitcoin payment and the rune tokens are received, we will initiate a splitting transaction. The details of this transaction are available in the `runeSplitParameters` field, the txid will appear in the `txid` field there
* Only after this splitting transaction is confirmed the launchapd will enter into a state `ready`. This means that the launchapd is ready and waiting to be started.
* Ask an ordinalsbot team member to start the launchpad by moving it into state `minting` or `allowlist`
  {% endhint %}

{% hint style="warning" %}

* As of right now `salesCap` is limited to 10,000, ask us privately if you need an increase
  {% endhint %}

### `POST` a new rune launchpad order

## Create a rune launchpad

<mark style="color:green;">`POST`</mark> `https://api.ordinalsbot.com/runes/launchpad/create`

#### Request Body

<table><thead><tr><th width="168">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>id<mark style="color:red;">*</mark></td><td>String</td><td>Human-readable launchpad id</td></tr><tr><td>rune<mark style="color:red;">*</mark></td><td>String</td><td>The name of rune you want to sell (with spacers)</td></tr><tr><td>creatorAddress<mark style="color:red;">*</mark></td><td>String</td><td>The bitcoin address where we will send the proceeds from the sale</td></tr><tr><td>saleSize<mark style="color:red;">*</mark></td><td>Number</td><td>We will sell this many tokens per batch (equivalent to terms.amount in runestone)</td></tr><tr><td>salesCap<mark style="color:red;">*</mark></td><td>Number</td><td>The number of available batches for sale (equivalent to terms.cap in runestone)  </td></tr><tr><td>totalTokensForSale<mark style="color:red;">*</mark></td><td>Number</td><td>The total amount of tokens that are available for sale on the launchpad. Must equal <code>saleSize * salesCap</code> </td></tr><tr><td>price<mark style="color:red;">*</mark></td><td>Number</td><td>Price per token</td></tr><tr><td>splittingFee<mark style="color:red;">*</mark></td><td>Number</td><td>Chain fee in sat/vb for the splitting transaction required before starting the launchpad</td></tr><tr><td>publicAllocation</td><td>Number</td><td>Publicly available allocation of tokens</td></tr><tr><td>allowList</td><td>Object</td><td>The allowlist</td></tr><tr><td>accessRules</td><td>Array</td><td>Array of objects that set rules on who can claim tokens from the launchpad.<br><br>e.g. [{"api": "brc20", "token": "TRIO", "allocation":10}]<br>This will check user address balance for brc20 TRIO tokens and allow them to claim 10 rune launchpad tokens per TRIO they hold. </td></tr><tr><td>metadata</td><td>Object</td><td>Any metatada you wish for your collection you can pass it as any type of JS object here. Max size 10kb.</td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "id": "f5c055a5-05c7-4208-b911-beb6191a8068",
    "charge": {
        "address": "bc1qrt6u67my3ucgjj0lmvvtwgkvcnx3dq3yeupdz0",
        "amount": 5450200
    },
    "tokenCharge": {
        "address": "bc1qcqpyymhqq5sqpxz3c9ws20lqg6t2gxsnt83jpa",
        "amount": 1000000,
        "rune": "TRIO•ORDINALSBOT"
    },
    "runeSplitParameters": {
        "rune": "TRIO•ORDINALSBOT",
        "splitsNumber": 1000,
        "splitSize": 1000,
        "fee": 5450200,
        "executed": false
    },
    "rune": "TRIO•ORDINALSBOT",
    "creatorAddress": "bc1pgnwmg7wplc09cm9fctgmgalu7l4synjh7khwzre9qlcvg5xy0k5qz9mwe3",
    "saleSize": 1000,
    "salesCap": 1000,
    "totalTokensForSale": 1000000,
    "price": 1,
    "publicAllocation": 0,
    "state": "waiting-prepayment",
    "paidItemCount": 0,
    "allocatedItemCount": 0,
    "mintedItemCount": 0,
    "createdAt": {
        ".sv": "timestamp"
    }
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```json
{
    status: 'error',
    error: 'error reason'
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}
{% endtabs %}

```json
// Here's a sample payload you can POST to create a rune order
{
    "splittingFee": 100,
    "rune": "TRIO•ORDINALSBOT",
    "creatorAddress": "bc1pgnwmg7wplc09cm9fctgmgalu7l4synjh7khwzre9qlcvg5xy0k5qz9mwe3",
    "price": 1,
    "saleSize": 1000,
    "salesCap": 1000,
    "totalTokensForSale": 1000000
}
```
