Session Keys

private/edit_session_key

Changed on

Updates an existing session key's label, IP allowlist, and/or off-chain scopes for a given wallet; it cannot change on-chain (protocol) scopes, for which you must re-register with private/set_session_key. Editing only the label needs account-info permission, while changing the IP allowlist or off-chain scopes requires admin/owner authorization. Returns the updated session key details.

post/private/edit_session_key

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    API key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature

Request body

EditSessionKeyRequest required
ip_whitelist, string[] nullable
label, string nullable

Send null to clear the label; omit the field to leave it unchanged.

offchain_scopes, string[] nullable
public_session_key, string required
wallet, string required

Response

Success

SessionKey required
expiry_sec, integer required
ip_whitelist, string[] required
label, string required
offchain_scopes, string[] required

Off-chain scopes (read-tier capabilities).

protocol_scopes, string[] required

Protocol-level (on-chain authority) scopes.

public_session_key, string required
registered_sec, integer required
subaccount_ids, integer[] required

Subaccounts this key may act on. An empty stored value means "all subaccounts" and is expanded to the wallet's current subaccount list.

Changes

    • info

      the endpoint scheme security DeriveWallet AND DeriveTimestamp AND DeriveSignature was added to the API

    • info

      added the media type application/json for the response with the status