Skip to main content
POST
/
auth
/
proxy
/
remove
curl -X POST https://api.electronhub.ai/v1/auth/proxy/remove \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"proxy_key": "ek-proxy-1234567890abcdef"}'
{
  "message": "Proxy key deleted"
}
Permanently delete a single proxy key you own. The proxy key is identified by the proxy_key field in the request body so the URL is static and can be exact-matched at the edge (Cloudflare, etc.), making it immune to path-traversal-append DDoS abuse. The legacy DELETE /v1/auth/proxy/delete/{proxy_key} still works for backward compatibility but is discouraged for new integrations. (Note: prior to the 2026-05-23 release, that legacy endpoint had no auth or ownership check — if your code relied on that, you must now send a valid API key for the account that owns the key.)
curl -X POST https://api.electronhub.ai/v1/auth/proxy/remove \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"proxy_key": "ek-proxy-1234567890abcdef"}'
{
  "message": "Proxy key deleted"
}

Request Body

proxy_key
string
required
The proxy key to delete (starts with ek-proxy-). Must be a string between 1 and 256 characters and must be a proxy key you own — cross-account deletes return 403 Forbidden.

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 — missing, malformed, or invalid Authorization header. JWT tokens are not accepted on this endpoint.
403
error
Forbidden — the proxy key exists but is owned by a different account.
404
error
Not Found — no proxy key with that value exists (or was already deleted).
422
error
Unprocessable Entity — the request body is missing proxy_key or violates the length constraint (1 <= len <= 256).
429
error
Rate Limited — too many requests, please slow down.

Notes

  • Requires an API key (ek-...) in the Authorization header. JWT tokens are intentionally rejected.
  • Proxy keys themselves (ek-proxy-...) cannot call this endpoint — only the parent account that owns the proxy key can delete it.

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-')

Body

application/json
proxy_key
string
required

The proxy key to look up / toggle / delete (must be one you own)

Required string length: 1 - 256
Example:

"ek-proxy-1234567890abcdef"

Response

Proxy key deleted successfully

message
string
Example:

"Proxy key deleted"