# Create a new Launchpad

{% hint style="info" %}
An API Key is required to interact with Launchpad APIs. Please contact us to get an API Key and get started.

A Marketplace is required to create a new launchpad as it'll inherit fees from it.&#x20;
{% endhint %}

Use this endpoint to create a new launchpad.\
To create a new launchpad ids for all the preinscribed inscriptions along with other launchpad related data including allowlst and phases needs to be provided to the create launch endpoint. This initiates the launchpad creation and creates a partially signed bitcoin transaction(PSBT) which needs to be signed by the wallet that has all the pre inscribed inscriptions.

### `POST` /launchpad/create-launch

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

API Key is required in the header:

`headers: { 'x-api-key': '<YOUR_API_KEY>', ...otherHeaders }`

Example Request Body, this will create a new `launch`:

```json
{
  "sellerPaymentAddress": "3NyCZefqHSYiQRQdqaxYkaHnuFED1vyc4q",
  "sellerOrdinalPublicKey": "4fa4865e593f24fbf0852ca94039e68cdaae783098918ed6b0118fad4e476541",
  "phases": [
    {
      "ordinals": [
        "8f46149faff54a7efe0c5c73a633077a8009b374ebcf6d80609807eab8d73218i0"
      ],
      "allowList": {
        "bc1pdtkxdpunmu9rfj7tcglt4kcg2qya8w4y4cxhqcy9fscqnwdk8c7q6ec2w3": {
          "allocation": 5
        }
      },
      "isPublic": 0, // has to be 0 for false, 1 for true
      "price": 6000,
      "startDate": 1715754339,
      "endDate": 1715840739,
      "name": "Allowlist Phase 1"
    }
  ],
  // stringified metadata object
  "metaData": "{\"title\":\"This is amazing\",\"description\":\"This is amazing Description\",\"imageURL\":\"https://example.com/image.jpg\"}"
}
```

#### Request Body

| Name                   | Type   | Description                                                                                                      |
| ---------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| sellerPaymentAddress   | String | Creator or launchpad owner address to receive all bitcoin proceeds from launchpad sales                          |
| sellerOrdinalPublicKey | String | <p>The public key for the wallet address that owns all the inscriptions to be listed on the launchpad</p><p></p> |
| phases                 | Array  | An array of Phase objects each containing details about each phase of the launch                                 |

### Phase Object

| Name      | Type    | Description                                                                                                                                                                        |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ordinals  | Array   | An array of ordinal IDs in string format                                                                                                                                           |
| allowlist | Object  | Mapping of addresses to their allocations.                                                                                                                                         |
| isPublic  | Boolean | Whether the phase is public or private. Public is open to everyone without the need for an allowlist                                                                               |
| price     | number  | Price for this phase for each inscription in sats                                                                                                                                  |
| startDate | number  | Start timestamp for the phase.                                                                                                                                                     |
| endDate   | number  | End timestamp for the phase.                                                                                                                                                       |
| metaData  | String  | Stringified Object with key value pairs. Properties for the launchpad like name description image links etc any launchpad specific key value properties can be stored in metaData. |

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

```json
// Response has the the launchpd id and the status
// status is pending while the psbt is being created
// Once psbt is ready status will change to pending confirmation
 
{
  "launchpadId": "65a123b789cdef0123456789",
  "status": "pending"
}

```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}
