v51
latestOpenAPI 3.0.3Mozilla Public License Version 2.0raw.githubusercontent.com2026-08-0165205256.0 KBKeys
This will validate a key definition.
This will check if the body of a key definition is valid. And return a response with how the key would look like if you were to create it.
post/tyk/keys/preview
Request body
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
Key definition is valid.
Example response
{
"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
}