Skip to main content
POST
POST /accounts/me/keys/{apiKeyId}/revoke disables one API key of your account. It takes effect at once: the next request signed with that key fails with 403. Use it to retire the old key after a rotation, as soon as your services use the new key. A revoked key can’t be restored. The API console doesn’t call the key endpoints: run them from your server, where your credentials live.

Rules

  • Same account only. Sign with any active or rotating key of the account, including the key you revoke. A key ID that belongs to another account, or to none, returns 404 NOT_FOUND with the message "Key not found", so the API doesn’t reveal whether it exists elsewhere.
  • Keep one active key. You can’t revoke the account’s last active key: rotate it first, check the new key, then revoke the old one. The API refuses the call, and the key stays active. List your keys before you revoke.
  • Calling it again is safe. Revoking a key that is already revoked, or a rotating key that has become expired, returns 200 with status revoked.
  • No undo. To get a working key back, rotate the active key or create a new account.
  • 10 per hour. An account can send 10 revocation requests per hour, repeats included, on every plan. Over that, the API answers 429 RATE_LIMIT_EXCEEDED and the key’s status doesn’t change: wait up to an hour. A 503 SERVICE_UNAVAILABLE means Olympex refused the call for now and changed nothing: retry it after a few seconds.
reason is optional and goes to Olympex’s audit record, up to 200 characters; a longer one returns 400 VALIDATION_ERROR with the message "Invalid revoke body". Never put a credential in it.

Authorizations

x-api-key-id
string
header
required

Your API key ID (UUID). See Sign requests.

x-value-info
string
header
required

Base64 of timestamp + "\n" + nonce + "\n" + bodyHash, where timestamp is Unix seconds, nonce is 24 new hexadecimal characters and bodyHash is the unpadded base64url SHA-256 of the canonical body.

x-passphrase
string
header
required

Your account passphrase. Treat it like the secret key.

x-signature
string
header
required

Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with \n, with no trailing newline: OLPX-HMAC-SHA256-V2, timestamp, nonce, the uppercase method, path, canonicalQuery and bodyHash. path is the request path including /api/v1, without the query string, for example /api/v1/limit-order/<id>. canonicalQuery is the query parameters decoded (+ is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with &, or the empty string when there is no query. Headers signed for one request are rejected on any other. See Sign requests.

Path Parameters

apiKeyId
string
required

The API key ID to revoke, as GET /accounts/me/keys lists it.

Body

application/json

Optional. Send {}, a reason, or no body.

reason
string

Why you revoke the key, for Olympex's audit record. Up to 200 characters.

Maximum string length: 200

Response

The key is revoked.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required