latestOpenAPI 3.0.32026-08-20146131.7 MB

672b1916ba61

API Keys

Update API key

Updates API key attributes. Use null to clear optional fields.

patch/v1/api-keys/{keyId}

Path parameters

keyIdstring required

API key identifier.

Example:key_example

API key identifier.

Headers

x-project-idstring

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Example:prj_example

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Request body

namestring

Updated key name.

descriptionstring nullable

Updated description. Use null to clear.

walletScope'all' | 'selected'

Updated wallet access mode. Provide this when changing wallet bindings, or by itself to reset the key to all wallets.

allowedIpsstring[] nullable

Updated IPv4/IPv6 address or CIDR allowlist. Use null to clear.

expiresAtstring date-time nullable

Updated expiration. Use null to clear.

permissionsstring[] nullable

Updated explicit permission set. Use null to revert to role defaults.

signingWalletIdstring nullable

Updated default signing wallet binding. Use null to clear all wallet bindings.

signingWalletIdsstring[] nullable

Updated list of wallet IDs bound to this key. Use null to clear all wallet bindings.

Example request

{
  "name": "Primary Key Updated",
  "description": "Rotated key for new service.",
  "walletScope": "all",
  "allowedIps": [
    "203.0.113.0/24"
  ],
  "expiresAt": "2026-01-01T00:00:00.000Z",
  "permissions": [
    "tokens:read",
    "tokens:write"
  ],
  "signingWalletId": "privy_wallet_123",
  "signingWalletIds": [
    "privy_wallet_123",
    "dfns_wallet_456"
  ]
}

Response

API key updated

Example response

{
  "data": {
    "success": true
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}