> For the complete documentation index, see [llms.txt](https://w3block.gitbook.io/w3block-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://w3block.gitbook.io/w3block-eng/dev-docs/api/key-api-services/tokens/token-collections.md).

# Token Collections

Token Collections are a group of tokens that you define that are similar to each other. When you create a collection it can have as many tokens as you want.\
\
When you create a collection it starts as a **draft**. When you publish it you can choose any number of tokens to mint from your collection, you do not need to mint them all right away. Then the collection becomes **published**.

Before you publish your collection it is recommended that you estimate the gas that will be used for it so that you know you have enough in your wallet to make the operation.

### Create a collection draft

To create you collection draft you will need to select a contract that you published, along with other parameters for your tokens

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections" method="post" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Get your token collections

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections" method="get" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Publish a token collection

When you publish a collection what you actually do is mint a certain number of tokens from your collection, you can choose to mint from 1 to all of your collections tokens when you initially publish you contract. You can later mint the rest of the collections tokens in any quantity you like at a time

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections/publish/{id}" method="patch" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Estimate publish Gas

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections/estimate-gas" method="get" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Get a token collection

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections/{id}" method="get" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Edit a collection draft

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections/{id}" method="put" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Burn a token collection

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections/{id}/burn" method="delete" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}

### Delete a token collection draft

{% openapi src="<https://api.pixway.io/docs-json>" path="/{companyId}/token-collections/{id}/draft" method="delete" %}
<https://api.pixway.io/docs-json>
{% endopenapi %}
