Walletguide
DevelopersAPIReferenceaccessRequests

ChangeRole

Changes another member's role, or their exact permission list. Without permissions the member gets the role's preset.

POST
/wallets/{walletId}/accessRequests/changeRole

Authorization

bearerAuth
headerAuthorization<token>

A Walletguide API key (wg_…) or an OAuth bearer token. Paste the value only. Create a key under Wallet settings → API keys.

Path Parameters

walletId*string

Row uuid

Formatuuid

Request Body

application/json
  1. body
userId*string

The member's user id: userId in the list members_list returns.

Formatuuid
role*string

A role that can be granted to a member or an API key.

Value in"editor""viewer"
permissions?array<>|

An exact permission list instead of the role's preset.

Items1 <= items

Response Body

Stored, waiting for the person to approve

application/json
  1. response
id*string
Formatuuid
walletId*|
Formatuuid
action*string
Value in"invite""changeRole""removeMember""revokeInvitation""createApiKey""revokeApiKey""deleteWallet"
params*||||||
memberSnapshot*|null
status*string
Value in"pending""executing""succeeded""failed""rejected"
result*|null
error*|null
approvalUrl*string
createdTime*string
expiresTime*string
decidedTime*string|null
curl -X POST 'https://api.walletguide.com/wallets/497f6eca-6276-4993-bfeb-53cbbbba6f08/accessRequests/changeRole' \  -H 'Content-Type: application/json' \  -d '{  "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",  "role": "editor"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "walletId": "0ecad4a2-3549-43fb-807e-9ff033247480",  "action": "invite",  "params": {    "action": "invite",    "email": "user@example.com",    "role": "editor",    "permissions": [      "assets:read"    ]  },  "memberSnapshot": {    "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",    "role": "owner",    "permissions": [      "assets:read"    ]  },  "status": "pending",  "result": {    "invitationId": "550a4884-8473-4f2e-a6cf-551c16767d59",    "apiKeyId": "37ba0474-c0bb-4910-bfb5-d6cebb614366"  },  "error": {    "code": "expired",    "message": "string"  },  "approvalUrl": "string",  "createdTime": "string",  "expiresTime": "string",  "decidedTime": "string"}