Skip to main content
PATCH
/
v1
/
wallets
/
{walletId}
Update Wallet
curl --request PATCH \
  --url https://api.example.com/v1/wallets/{walletId}
Endpoint: PATCH https://api.rebelfi.io/v1/wallets/:walletId
Update a wallet’s metadata fields. Only provided fields are updated.

Path Parameters

ParameterTypeRequiredDescription
walletIdnumberYesWallet ID

Request Body

FieldTypeRequiredDescription
userIdstringNoExternal user ID
orgMetadataobjectNoOrganization-specific metadata

Example Request

curl -X PATCH "https://api.rebelfi.io/v1/wallets/42" \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "orgMetadata": { "plan": "enterprise", "tier": 2 }
  }'

Example Response

{
  "walletId": 42,
  "walletAddress": "So11...abc",
  "blockchain": "solana",
  "userId": "user-123",
  "orgMetadata": { "plan": "enterprise", "tier": 2 },
  "createdAt": "2024-01-15T10:30:00.000Z"
}

orgMetadata Behavior

The orgMetadata field performs a full replace of existing metadata. To preserve existing keys, include all desired keys in the request. Setting orgMetadata to {} clears all metadata.

Errors

CodeDescription
WALLET_NOT_FOUNDWallet with given ID doesn’t exist