v51

latestOpenAPI 3.0.3Mozilla Public License Version 2.0raw.githubusercontent.com2026-08-0165205256.0 KB
Organisation Quotas

Update Organisation Key

This work similar to Keys API except that Key ID is always equals Organisation ID

For Gateway v2.6.0 onwards, you can now set rate limits at the organisation level by using the following fields - allowance and rate. These are the number of allowed requests for the specified per value, and need to be set to the same value. If you don't want to have organisation level rate limiting, set rate or per to zero, or don't add them to your request.

put/tyk/org/keys/{keyID}

Path parameters

keyIDstring required

The Key ID

Query parameters

reset_quota'1'

Adding the reset_quota parameter and setting it to 1, will cause Tyk reset the organisations quota in the live quota manager, it is recommended to use this mechanism to reset organisation-level access if a monthly subscription is in place.

Request body

access_rightsobject nullable
aliasstring
allowancenumber double
apply_policiesstring[] nullable
apply_policy_idstring

deprecated use apply_policies going forward instead to send a list of policies ids

certificatestring
data_expiresinteger
date_createdstring date-time
enable_detail_recordingboolean

deprecated use enable_detailed_recording going forward instead

enable_detailed_recordingboolean
enable_http_signature_validationboolean
expiresinteger
hmac_enabledboolean
hmac_stringstring
id_extractor_deadlineinteger
is_inactiveboolean
last_checkinteger
last_updatedstring
max_query_depthinteger
meta_dataobject nullable
oauth_client_idstring
oauth_keysobject nullable
org_idstring
pernumber double
post_expiry_action'retain' | 'delete'

Defines the action to take on a Session in Redis after it expires. Valid values are "retain" and "delete".

post_expiry_grace_periodinteger

Duration in seconds to retain a Session in Redis after it expires. Used with post_expiry_action "retain". Set to -1 to retain indefinitely.

quota_maxinteger
quota_remaininginteger
quota_renewal_rateinteger
quota_renewsinteger
ratenumber double
rsa_certificate_idstring
session_lifetimeinteger
tagsstring[] nullable
throttle_intervalnumber double
throttle_retry_limitinteger

Example request

{
  "alias": "portal-developer@example.org",
  "allowance": 1000,
  "apply_policies": [
    "641c15dd0fffb800010197bf"
  ],
  "apply_policy_id": "641c15dd0fffb800010197bf",
  "date_created": "2024-03-13T03:56:46.568042549Z",
  "enable_detailed_recording": true,
  "expires": 1712895619,
  "last_updated": "1710302206",
  "max_query_depth": -1,
  "meta_data": {
    "tyk_developer_id": "62b3fb9a1d5e4f00017226f5"
  },
  "monitor": {
    "trigger_limits": [
      80,
      60,
      50
    ]
  },
  "org_id": "5e9d9544a1dcd60001d0ed20",
  "per": 5,
  "post_expiry_action": "delete",
  "quota_max": 20000,
  "quota_remaining": 20000,
  "quota_renewal_rate": 31556952,
  "quota_renews": 1710302205,
  "rate": 1,
  "tags": [
    "edge",
    "edge-eu"
  ],
  "throttle_interval": 10,
  "throttle_retry_limit": 1000
}

Response

OK

actionstring
keystring
key_hashstring
statusstring

Example response

{
  "action": "modified",
  "key": "b13d928b9972bd18",
  "status": "ok"
}