> For the complete documentation index, see [llms.txt](https://docs.3mint.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.3mint.io/api-reference/token-gating/create-gate.md).

# Create Gate

## Verifying token gating requirements

## Validate address elements

<mark style="color:green;">`POST`</mark> `https://api.3mint.io/api/v1/tokenGate`

Single API call that verifies the ownership of a token and returns whether or not certain conditions are met.

#### Headers

| Name                                           | Type   | Description                        |
| ---------------------------------------------- | ------ | ---------------------------------- |
| X-API-KEY<mark style="color:red;">\*</mark>    | String | API key required for authorization |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json                   |

#### Request Body

| Name                                            | Type   | Description                                                    |
| ----------------------------------------------- | ------ | -------------------------------------------------------------- |
| contractAddress                                 | String | The address of an ERC-20, ERC-721, or ERC-1155 contract        |
| logic                                           | String | The and / or element to combine multiple requirements          |
| requirements                                    | List   | An extra list of requirements if a combo requirement is needed |
| type<mark style="color:red;">\*</mark>          | String | The type of asset being verified: erc1155, erc721, erc20, coin |
| walletAddress<mark style="color:red;">\*</mark> | String | The address of an Externally Owned Account (EOA)               |
| network                                         | String | The network in question: Mainnet, Mumbai, Goerli, etc.         |
| tokenIds                                        | Array  | A list of token IDs                                            |
| chain                                           | String | The blockchain to use: Ethereum, Polygon, Optimism, etc.       |
| minBalance                                      | String | Minimum balance required                                       |
| maxBalance                                      | String | Maximum balance required                                       |
| minTime                                         | String | Minimum amount of time a wallet must hold the required balance |
| minTimestamp                                    | String | The date from which the wallet must hold the required balance  |

{% tabs %}
{% tab title="400: Bad Request One or more arguments are invalid or required arguments are missing" %}

```javascript
{
  "code":"invalid_request",
  "msg":"string"
}
```

{% endtab %}

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

```javascript
{
    "result": "true"
}
```

{% endtab %}

{% tab title="401: Unauthorized The access token doesn't meet the token ownership requirements." %}

```javascript
{
  "code":"invalid_request",
  "msg":"string"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.3mint.io/api-reference/token-gating/create-gate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
