# Create a Collection

Use these endpoints to create a collection that other users will be able to create orders on and inscribe on demand.

{% hint style="warning" %}
All collections must be approved by the ordinalsbot.com team before they go live.

Collections with over 1000 items need to be manually uploaded.

Get in touch with us on [Discord](https://discord.ordinalsbot.com).

The `/order` endpoint has a rate limit of 2 requests per 10 seconds.A
{% endhint %}

## Create Collection

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

Use this method to create a collection, if your files are already on a publicly accessible URL.

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

<table><thead><tr><th width="282">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>files</td><td>Object</td><td><p>An array of objects that includes:</p><p>name:string; => name of the file including extension.</p><p>size:number; => size of the file in bytes</p><p><strong>url:string; => publicly accessible image URL</strong></p><p>You can also provide files manually after contacting us.</p></td></tr><tr><td>id<mark style="color:red;">*</mark></td><td>String</td><td><p>URL safe unique collection slug.</p><p>Will be used as mint URL.</p></td></tr><tr><td>name<mark style="color:red;">*</mark></td><td>String</td><td>Collection Display Name</td></tr><tr><td>description<mark style="color:red;">*</mark></td><td>String</td><td>Collection description</td></tr><tr><td>creator<mark style="color:red;">*</mark></td><td>String</td><td>Collection creator</td></tr><tr><td>totalCount<mark style="color:red;">*</mark></td><td>Number</td><td>Max supply of the collection.</td></tr><tr><td>price</td><td>Number</td><td><p>Inscription price per file (for collection creator)</p><p>set to 0 for free mints</p></td></tr><tr><td>altPrices</td><td>Object</td><td><p>Price item in collection with rune tokens. Any rune token can be used.</p><p></p><p>Parameters:<br><strong>rune => rune price object</strong><br><strong>rune price object => amount</strong></p><p><strong>rune price object => token</strong><br></p><p>example:</p><pre class="language-json"><code class="lang-json">{
        "rune": {
            "amount": 1,
            "token": "SHITCOIN•PARADISE"
        }
}
</code></pre></td></tr><tr><td>twitter</td><td>String</td><td>Collection twitter account</td></tr><tr><td>website</td><td>String</td><td>Collection website</td></tr><tr><td>banner</td><td>String</td><td>Collection banner image URL</td></tr><tr><td>cover</td><td>String</td><td>Collection cover image URL</td></tr><tr><td>creator-address</td><td>String</td><td>Bitcoin address to receive payouts from inscriptions</td></tr><tr><td>allowList</td><td>Object</td><td><p>allowList object in this format</p><p></p><p>{</p><p>  "address1": {</p><p>    "allocation": 5</p><p>  },</p><p>  "address2": {</p><p>    "allocation": 3</p><p>  },</p><p>}</p></td></tr></tbody></table>

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

```json
{
    status: 'ok',
    ..., // input parameters
    createdAt: 1675785959855, // timestamp in ms,
}
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

{% hint style="info" %}
As a collection creator, if you need access to inscription IDs from your collection you can access them here: <https://api.ordinalsbot.com/get-collection-json?id=>\<collection-id>
{% endhint %}

## Get Collection JSON

<mark style="color:green;">`GET`</mark> `https://api.ordinalsbot.com/get-collection-json`

Use this method to get a collection json, that is usable by marketplaces for secondary market listing.

#### Request Parameters

<table><thead><tr><th width="288">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>id<mark style="color:red;">*</mark></td><td>String</td><td>URL safe unique collection ID of the collection on OrdinalsBot</td></tr><tr><td>onchainFormat</td><td>Boolean</td><td>Set to <code>true</code> if you prefer to have the collection json in EVM friendly format.</td></tr></tbody></table>

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

```json
[
    {
        "id": "0c3d76bfbe081ffe3c447348b1f45e373a60b267ca3de96a46ab59473dab2c2bi0",
        "meta": {
            "attributes": {
                "inscribed_by": "OrdinalsBot"
            },
            "name": "Pixlbot Test 1 #1"
        }
    },
    ...
]
```

{% endtab %}

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

```json
// onchainFormat=true
[
    {
        "id": "0c3d76bfbe081ffe3c447348b1f45e373a60b267ca3de96a46ab59473dab2c2bi0",
        "meta": {
            "inscribed_by": "OrdinalsBot",
            "name": "Pixlbot Test 1 #1"
        }
    },
    {
        "id": "568d0c679af7f9c6304c55841b781eb72c4e5535fb8451322ed3e243b52e1584i0",
        "meta": {
            "inscribed_by": "OrdinalsBot",
            "name": "Pixlbot Test 1 #2"
        }
    },
    ...
]
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ordinalsbot.com/api/create-a-collection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
