---
title: "Updates a gate"
method: PUT
path: "/environments/{environmentId}/gates/{gateId}"
tags: ["Gates"]
---

# Updates a gate

`PUT /environments/{environmentId}/gates/{gateId}`

## Path parameters

- `environmentId` string, required
- `gateId` string, required

## Request body

- GateUpdateRequest — Request body to update an existing gate. This will not affect whether a gate is enabled or not.
  - `name` string — Human-readable name of the gate. This should be something helpful to organize gates.
  - `outcome` 'scope' | 'siteAccess' | 'block'
  - `scope` string — String for the resulting scope of the gate. If the rules of the gate apply to the user being verified, then this scope will be surfaced in the JWT
  - `rules` GateRule[] — The rules which will be used to evaluate users being verified. If multiple rules are present in a single gate, then all the rules need to apply for the user to gain the scope defined by the gate.
    - `type` 'nft' | 'token', required
    - `address` TokenAddress, required — Defines one token address connected with network Id on which it's working
      - `networkId` number, required — Id of the network
      - `contractAddress` string, required — Valid blockchain wallet address, must be an alphanumeric string without any special characters
    - `filter` GateRuleFilter — Defines the filter properties used for the gate
      - `tokenId` string
      - `amount` number — Minimum token or NFT amount held by the user. If this `amount` field is provided, then Dynamic will also check that the user has this minimum amount held by the user of the NFT or Token
    - `chain` 'ETH' | 'EVM' | 'FLOW' | 'SOL' | 'ALGO' | 'STARK' | 'COSMOS' | 'BTC' | 'ECLIPSE' | 'SUI' | 'SPARK' | 'TRON' | 'APTOS' | 'TON' | 'STELLAR'

## Response `200`

Successful

- Gate
  - `id` string, required
  - `name` string, required — Human-readable name of the gate. This should be something helpful to organize gates.
  - `scope` string — String for the resulting scope of the gate. If the rules of the gate apply to the user being verified, then this scope will be surfaced in the JWT. If a scope is not provided for the gate, the default behavior of the gate would be to block access to users that the rules do not currently apply to.
  - `enabledAt` string, date-time, nullable — If the gate is enabled, then this timestamp will be present.
  - `rules` GateRule[], required — The rules which will be used to evaluate users being verified. If multiple rules are present in a single gate, then all the rules need to apply for the user to gain the scope defined by the gate.
    - `type` 'nft' | 'token', required
    - `address` TokenAddress, required — Defines one token address connected with network Id on which it's working
      - `networkId` number, required — Id of the network
      - `contractAddress` string, required — Valid blockchain wallet address, must be an alphanumeric string without any special characters
    - `filter` GateRuleFilter — Defines the filter properties used for the gate
      - `tokenId` string
      - `amount` number — Minimum token or NFT amount held by the user. If this `amount` field is provided, then Dynamic will also check that the user has this minimum amount held by the user of the NFT or Token
    - `chain` 'ETH' | 'EVM' | 'FLOW' | 'SOL' | 'ALGO' | 'STARK' | 'COSMOS' | 'BTC' | 'ECLIPSE' | 'SUI' | 'SPARK' | 'TRON' | 'APTOS' | 'TON' | 'STELLAR'
  - `outcome` 'scope' | 'siteAccess' | 'block', required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/dynamic/apis/dashboard-api.md) · [All operations](https://skmtc.net/dynamic/apis/dashboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dynamic/dashboard-api/revisions/aac826315d90/schema)
