Overview
Toggle the active status of a proxy key between enabled and disabled states. This provides a non-destructive way to temporarily revoke access without losing the key’s configuration.Path Parameters
The proxy key ID to toggle (starts with
ek-proxy-)Response Fields
Confirmation message that the status was updated
The new status of the proxy key (
true = active, false = inactive)Behavior
The toggle endpoint switches the proxy key between two states:- Active (
true): The proxy key can be used for API requests - Inactive (
false): The proxy key is rejected with authentication errors
Use Cases
Temporary Suspension
Quickly disable access during maintenance or investigations
Conditional Access
Enable/disable keys based on business logic or schedules
Security Response
Immediately block suspicious activity without permanent deletion
Testing
Safely test key revocation and restoration workflows
Advantages Over Deletion
Preservation
Preservation
All key settings (name, expiration, credits, restrictions) are preserved
Reversibility
Reversibility
Can be quickly re-enabled without reconfiguring settings
Audit Trail
Audit Trail
Key history and usage statistics remain intact
Credit Protection
Credit Protection
Allocated credits stay with the key and aren’t returned to main balance
Example Workflow
Python - Automated Key Management
Error Codes
Unauthorized - Invalid or missing API key
Forbidden - You don’t have permission to modify this proxy key
Not Found - Proxy key doesn’t exist
Rate Limited - Too many requests, please slow down
Related Endpoints
- List Proxy Keys - View current status of all keys
- Update Proxy Key - Modify key configuration
- Delete Proxy Key - Permanently remove a key
Authorizations
Enter your API key (starts with 'ek-')
Path Parameters
Proxy key ID
