POST
/
tyk
/
keys
/
policy
/
{keyID}
Set policies for a hashed key.
curl --request POST \
  --url https://{tenant}/tyk/keys/policy/{keyID} \
  --header 'Content-Type: application/json' \
  --header 'X-Tyk-Authorization: <api-key>' \
  --data '{
  "apply_policies": [
    "5ead7120575961000181867e"
  ],
  "policy": ""
}'
{
  "action": "updated",
  "key": "5e9d9544a1dcd60001d0ed207eb558517c3c48fb826c62cc6f6161eb",
  "status": "ok"
}

Authorizations

X-Tyk-Authorization
string
header
required

Api key

Path Parameters

keyID
string
required

Name to give the custom key.

Body

application/json
apply_policies
string[] | null
policy
string

Response

Updated hashed key.

action
string
Example:

"modified"

key
string
Example:

"b13d928b9972bd18"

key_hash
string
status
string
Example:

"ok"