Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Revoke API key

Developer Platform, Sandbox & Key Management

POST

/api-keys/revoke

Revoke API key

Sandbox unsupportedPortal sign-in requiredcreateRevoke

Permanently revokes a specific API key. Use this to invalidate a compromised key immediately. If you revoke your only active key, you must contact support to restore access.

Parameters

This endpoint has no path or query parameters.

Headers

AuthorizationstringRequired

Bearer Firebase ID token from your partner portal session.

Idempotency-KeystringheaderRequired

Unique string that makes write calls safe to retry on network failure. Required for money movement, trading, KYC, subscriptions, and webhook creation. Deduplicated for 24 hours -- duplicate keys return the cached response. HTTP 409 if a concurrent request with the same key is still in progress.

Example: dep_user42_1743152580

Request body

apiKeystringRequired

The pk_live_ key to permanently revoke. Must belong to your account.

Example: "pk_live_a1b2c3d4e5f6..."

Response fields

messagestring

Example: "API key revoked."

apiKeystring

Masked form of the revoked credential.

Response codes

200Key revoked.
404Key not found or does not belong to this account.