Skip to main content
POST
Create a policy.

Authorizations

X-Tyk-Authorization
string
header
required

Api key

Body

application/json
_id
string
Example:

"5ead7120575961000181867e"

access_rights
object | null
active
boolean
Example:

true

enable_http_signature_validation
boolean
Example:

false

graphql_access_rights
object | null
hmac_enabled
boolean
Example:

false

id
string
Example:

"5ead7120575961000181867e"

is_inactive
boolean
Example:

false

key_expires_in
integer<int64>
Example:

0

last_updated
string
Example:

"1655965189"

max_query_depth
integer
Example:

-1

meta_data
object | null
name
string
Example:

"Swagger Petstore Policy"

org_id
string
Example:

"5e9d9544a1dcd60001d0ed20"

partitions
object
per
number<double>
Example:

60

post_expiry_action
enum<string>

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

Available options:
retain,
delete
Example:

"delete"

post_expiry_grace_period
integer<int64>

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

Example:

0

quota_max
integer<int64>
Example:

-1

quota_renewal_rate
integer<int64>
Example:

3600

rate
number<double>
Example:

1000

smoothing
object | null
tags
string[] | null
throttle_interval
number<double>
Example:

-1

throttle_retry_limit
integer
Example:

-1

Response

Policy created.

action
string
Example:

"modified"

key
string
Example:

"b13d928b9972bd18"

key_hash
string
status
string
Example:

"ok"