curl --request PUT \
--url https://api.portkey.ai/v1/policies/usage-limits/{policyUsageLimitsId} \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"credit_limit": 2000,
"alert_threshold": 1500,
"reset_usage_for_value": "api-key-123"
}
'{}Update Usage Limits Policy
Update an existing usage limits policy.
PUT
/
policies
/
usage-limits
/
{policyUsageLimitsId}
curl --request PUT \
--url https://api.portkey.ai/v1/policies/usage-limits/{policyUsageLimitsId} \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"credit_limit": 2000,
"alert_threshold": 1500,
"reset_usage_for_value": "api-key-123"
}
'{}Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us
Authorizations
Path Parameters
Usage limits policy UUID
Body
application/json
Policy name
Maximum string length:
255Policy description
Maximum string length:
500Array of conditions that define which requests the policy applies to. If provided, this replaces the existing conditions on the policy.
Minimum array length:
1Show child attributes
Show child attributes
Maximum usage allowed
Required range:
x >= 0Threshold at which to send alerts. Must be less than credit_limit.
Required range:
x >= 0Reset period. Set to null to remove periodic reset. Cannot be combined with periodic_reset_days.
Available options:
monthly, weekly Number of days after which usage resets. Cannot be combined with periodic_reset.
Required range:
1 <= x <= 365ISO 8601 timestamp for the next scheduled usage reset.
Reset usage for a specific value key (e.g., API key). This will reset the usage counter for that key to 0.
Response
OK
The response is of type object.
Last modified on August 3, 2026
Was this page helpful?

