Skip to main content
PUT
/
environments
/
{environmentId}
/
gates
/
{gateId}
Updates a gate
curl --request PUT \
  --url https://app.dynamicauth.com/api/v0/environments/{environmentId}/gates/{gateId} \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Super User Gate",
  "outcome": "scope",
  "scope": "superuser",
  "rules": [
    {
      "type": "nft",
      "address": {
        "networkId": 1,
        "contractAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834"
      },
      "filter": {
        "tokenId": "0x01",
        "amount": 123
      },
      "chain": "ETH"
    }
  ]
}'
{
  "id": "95b11417-f18f-457f-8804-68e361f9164f",
  "name": "Super User Gate",
  "scope": "superuser",
  "enabledAt": "2023-11-07T05:31:56Z",
  "rules": [
    {
      "type": "nft",
      "address": {
        "networkId": 1,
        "contractAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834"
      },
      "filter": {
        "tokenId": "0x01",
        "amount": 123
      },
      "chain": "ETH"
    }
  ],
  "outcome": "scope"
}

Path Parameters

environmentId
string
required
Required string length: 36
Example:
gateId
string
required
Required string length: 36
Example:

Body

application/json
name
string
Example:
outcome
enum<string>
Available options:
scope,
siteAccess,
block
scope
string
Example:
rules
object[]

Response

id
string
required
Required string length: 36
Example:
name
string
required
Example:
rules
object[]
required
outcome
enum<string>
required
Available options:
scope,
siteAccess,
block
scope
string
Example:
enabledAt
string<date-time> | null