Skip to main content
PUT
/
api
/
portal
/
policies
/
{id}
Update policy definition.
curl --request PUT \
  --url https://{tenant}/api/portal/policies/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "access_rights": {
    "8ddd91f3cda9453442c477b06c4e2da4": {
      "allowed_urls": [
        {
          "methods": [
            "GET"
          ],
          "url": "/users"
        }
      ],
      "api_id": "8ddd91f3cda9453442c477b06c4e2da4",
      "api_name": "Itachi API",
      "disable_introspection": false,
      "versions": [
        "Default"
      ]
    }
  },
  "active": true,
  "hmac_enabled": false,
  "is_inactive": false,
  "key_expires_in": 2592000,
  "max_query_depth": -1,
  "meta_data": {
    "email": "itachi@tyk.io",
    "user_type": "mobile_user"
  },
  "name": "Sample policy",
  "partitions": {
    "acl": true,
    "complexity": false,
    "per_api": false,
    "quota": true,
    "rate_limit": true
  },
  "per": 60,
  "quota_max": 10000,
  "quota_renewal_rate": 3600,
  "rate": 1000,
  "tags": [
    "security",
    "messages"
  ],
  "throttle_interval": 10,
  "throttle_retry_limit": 10
}
'
{
  "Message": "Data updated",
  "Meta": null,
  "Status": "OK"
}

Documentation Index

Fetch the complete documentation index at: https://tyk.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Path Parameters

id
string
required

ID of policy to update.

Body

application/json
_id
string
access_rights
object
active
boolean
date_created
string<date-time>
hmac_enabled
boolean
id
string
is_inactive
boolean
key_expires_in
integer<int64>
last_updated
string
max_query_depth
integer
meta_data
object
name
string
org_id
string
partitions
object
per
number<double>
quota_max
integer<int64>
quota_renewal_rate
integer<int64>
rate
number<double>
smoothing
object
tags
string[] | null
throttle_interval
number<double>
throttle_retry_limit
integer

Response

Policy updated.

ID
string
Message
string
Meta
any
Status
string