# 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 %}


---

# 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://w3block.gitbook.io/w3block-eng/dev-docs/api/key-api-services/tokens/token-collections.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.
