auth.v1.SubaccountService
UpdateSubaccount
Update mutable sub-account fields (label/status/icon/color).
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/auth.v1.SubaccountService/UpdateSubaccount' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"expectedRevision": "1",
"subaccount": {
"color": "#7C3AED",
"icon": "💰",
"label": "Name Of My Subaccount",
"status": "SUBACCOUNT_STATUS_ACTIVE"
},
"subaccountId": "6789012345678",
"updateMask": {
"paths": [
"value"
]
}
}'Responses
{
"subaccount": {
"color": "#7C3AED",
"icon": "💰",
"id": "1",
"label": "Market Making",
"ownerAvatarUrl": "https://placehold.co/128x128.png",
"ownerRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"ownerUsername": "trader_alpha",
"removed": false,
"requireMemberMfa": false,
"revision": "1",
"role": "VIEWER",
"smartAccountAddress": "0x2222222222222222222222222222222222222222",
"smartAccountSaltNonce": 1,
"status": "SUBACCOUNT_STATUS_ACTIVE",
"subaccountPolicyId": "1",
"updatedAt": "2025-01-01T00:00:00Z"
}
}auth.v1.UpdateSubaccountRequestauth.v1.UpdateSubaccountResponseSub-account to update (opaque ID).
Label for the sub-account. Empty clears the label when selected.
User-chosen icon/emoji for UI display. Empty clears the icon when selected.
User-chosen color token for UI display. Empty clears the color when selected.
New lifecycle status. ACTIVE and DISABLED are accepted when selected by update_mask.
The set of field mask paths.
Revision returned by the latest successful read.
Sub-account identifier (opaque ID).
Role of the current caller on this sub-account. SUBACCOUNT_ROLE_UNSPECIFIED when removed is true.
Optional human-readable label for this sub-account.
Optional user-chosen icon/emoji for UI display.
Optional user-chosen color token for UI display. Tokens use lowercase letters, numbers, underscores, or hyphens.
Current public lifecycle status of the sub-account.
Smart Account EVM address backing this sub-account.
Owner (root account) public username, if set. Useful for shared views.
Owner (root account) avatar URL, if set.
Owner (root account) primary Smart Account address, when available. Allows clients to display a stable identity even when no username is set.
Optional sub-account policy identifier (opaque ID). 0 means no explicit policy attached.
Owner-controlled security baseline for delegated interactive members on protected sub-account actions. This does not apply to read-only real-time subscriptions.
Smart-account derivation salt nonce assigned when this sub-account was created. Present only when the caller owns the sub-account and can use it for direct chain signing.
Time in UTC when this sub-account's configuration was last changed. For the same sub-account, later is fresher, equal is an idempotent replay, and earlier is stale. Equal timestamps with different configuration, other than role and removed, indicate an invariant failure.
Monotonic resource revision used for conditional updates.
True when the caller no longer has access to this sub-account, for example after its owner removed the caller as a member: remove the sub-account from the caller's list. Only real-time updates set it; responses list only sub-accounts the caller can access. A change of the caller's role or access does not change revision or updated_at, so real-time updates deliver such changes in order and each one applies as it arrives. Ending access also ends the caller's subscriptions to this sub-account's real-time channels, and can, rarely, also end a subscription made after access was granted again. When the server ends a subscription to one of this sub-account's channels while the latest update lists this sub-account with a role and removed false, subscribe again: access is checked again on subscribe.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |