POST
/
admin
/
org
/
keys
Create a key.
curl --request POST \
  --url https://{tenant}/admin/org/keys \
  --header 'Admin-Auth: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "alias": "portal-key",
  "allowance": 1000,
  "apply_policies": [
    "62a0ec9092faf50001395817"
  ],
  "enable_detailed_recording": true,
  "expires": 1718439136,
  "hmac_enabled": false,
  "is_inactive": false,
  "meta_data": {
    "tyk_developer_id": "62b3fb9a1d5e4f00017226f5"
  },
  "org_id": "5e9d9544a1dcd60001d0ed20",
  "per": 60,
  "quota_max": -1,
  "quota_remaining": 0,
  "quota_renewal_rate": -1,
  "quota_renews": 1715847135,
  "rate": 1000,
  "tags": [
    "edge-eu",
    "edge"
  ],
  "throttle_interval": 0,
  "throttle_retry_limit": 0
}'
{
  "api_model": {},
  "data": {
    "access_rights": {},
    "alias": "<string>",
    "allowance": 123,
    "apply_policies": [
      "<string>"
    ],
    "apply_policy_id": "<string>",
    "basic_auth_data": {
      "hash_type": "<string>",
      "password": "<string>",
      "user": "<string>"
    },
    "certificate": "<string>",
    "data_expires": 123,
    "date_created": "2023-11-07T05:31:56Z",
    "enable_detailed_recording": true,
    "expires": 123,
    "hmac_enabled": true,
    "hmac_string": "<string>",
    "id_extractor_deadline": 123,
    "is_inactive": true,
    "jwt_data": {
      "secret": "<string>"
    },
    "key_id": "<string>",
    "last_check": 123,
    "last_updated": "<string>",
    "max_query_depth": 123,
    "meta_data": "<any>",
    "monitor": {
      "trigger_limits": [
        123
      ]
    },
    "oauth_client_id": "<string>",
    "oauth_keys": {},
    "org_id": "<string>",
    "per": 123,
    "quota_max": 123,
    "quota_remaining": 123,
    "quota_renewal_rate": 123,
    "quota_renews": 123,
    "rate": 123,
    "session_lifetime": 123,
    "smoothing": {
      "delay": 123,
      "enabled": true,
      "step": 123,
      "threshold": 123,
      "trigger": 123
    },
    "tags": [
      "<string>"
    ],
    "throttle_interval": 123,
    "throttle_retry_limit": 123
  },
  "key_hash": "<string>",
  "key_id": "<string>"
}

Authorizations

Admin-Auth
string
header
required

Api key

Body

application/json
access_rights
object | null
alias
string
allowance
number
apply_policies
string[] | null
apply_policy_id
string
basic_auth_data
object
certificate
string
data_expires
integer
date_created
string<date-time>
enable_detailed_recording
boolean
expires
integer
hmac_enabled
boolean
hmac_string
string
id_extractor_deadline
integer
is_inactive
boolean
jwt_data
object
key_id
string
last_check
integer
last_updated
string
max_query_depth
integer
meta_data
any
monitor
object
oauth_client_id
string
oauth_keys
object | null
org_id
string
per
number
quota_max
integer
quota_remaining
integer
quota_renewal_rate
integer
quota_renews
integer
rate
number
session_lifetime
integer
smoothing
object | null
tags
string[] | null
throttle_interval
number
throttle_retry_limit
integer

Response

Key added successfully

api_model
object
data
object
key_hash
string
key_id
string