Revoke API Key

Permanently revokes an API key by its identifier. The key becomes invalid immediately and any requests using it will return 401.

DELETE/api/v1/keys/:idRequires authentication
Immediate and irreversible
Revocation takes effect instantly. Any integrations using this key will stop working. This action cannot be undone.

Path parameters

idstringREQUIRED
The unique identifier of the API key to revoke (e.g. key_m1n2o3p4)

Request

No request body required. Pass the key ID as a path parameter.

Request examples
curl -X DELETE https://merx.exchange/api/v1/keys/key_m1n2o3p4 \
  -H "X-API-Key: sk_live_your_key_here"

Response

Returns a confirmation object. A successful response means the key has been permanently invalidated.

200Key revoked
{
  "revoked": true
}

Response fields

revokedbooleanAlways true on success
404Key not found
{
  "error": {
    "code": "NOT_FOUND",
    "message": "API key not found or already revoked"
  }
}