DELETE
/
auth
/
proxy
/
delete
/
{proxy_key}
curl -X DELETE https://api.electronhub.ai/v1/auth/proxy/delete/ek-proxy-1234567890abcdef \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY"
{
  "message": "Proxy key deleted"
}
curl -X DELETE https://api.electronhub.ai/v1/auth/proxy/delete/ek-proxy-1234567890abcdef \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY"
{
  "message": "Proxy key deleted"
}

Overview

Permanently delete a specific proxy key. This action cannot be undone, and the proxy key will immediately stop working for all API requests.

Path Parameters

proxy_key
string
required

The proxy key ID to delete (starts with ek-proxy-)

Important Considerations

Immediate Effect: The proxy key stops working immediately after deletion. Any applications using this key will start receiving authentication errors.

Irreversible: Deletion is permanent. You cannot recover a deleted proxy key - you’ll need to create a new one.

Credit Recovery: Any unused credits allocated to the proxy key are returned to your main account balance.

Before Deleting

Make sure to:

  1. Update Applications: Remove or replace the proxy key in any applications that use it
  2. Check Dependencies: Verify no critical services depend on this specific key
  3. Document Changes: Record the deletion for audit purposes
  4. Backup Configuration: Save the key’s settings if you might need to recreate it later

Bulk Operations

To delete all proxy keys at once, use the Delete All Proxy Keys endpoint instead.

Use Cases

Security Incident

Quickly revoke access when a key is compromised

Project Completion

Clean up keys when projects are finished

Team Changes

Remove access when team members leave

Key Rotation

Delete old keys as part of regular security practices

Error Codes

401
error

Unauthorized - Invalid or missing API key

403
error

Forbidden - You don’t have permission to delete this proxy key

404
error

Not Found - Proxy key doesn’t exist or was already deleted

429
error

Rate Limited - Too many requests, please slow down

Alternative: Toggle Status

If you want to temporarily disable a proxy key instead of permanently deleting it, consider using the Toggle Proxy Key Status endpoint instead. This allows you to disable and re-enable keys as needed.

Authorizations

Authorization
string
header
required

Enter your API key (starts with 'ek-')

Path Parameters

proxy_key
string
required

Proxy key ID

Response

200 - application/json

Proxy key deleted successfully

The response is of type object.