# Update member role

Update the role of an existing business member. Requires BUSINESS auth (min role: ADMIN) or TENANT admin.

Endpoint: PUT /businesses/{businessId}/members/{userId}
Version: 2.0.53
Security: projectKey, authJWT

## Path parameters:

  - `businessId` (string, required)

  - `userId` (string, required)

## Request fields (application/json):

  - `role` (string)
    The new role to assign (permissions derived from role)
    Enum: "OWNER", "ADMIN", "EDITOR", "VIEWER"

## Response 200 fields (application/json):

  - `id` (string, required)
    Unique identifier for this membership

  - `userId` (string, required)
    The user ID who has access to this business

  - `businessId` (string, required)
    The business ID this membership belongs to

  - `role` (string, required)
    The role the user has in this business. Permissions are derived from role.
    Enum: "OWNER", "ADMIN", "EDITOR", "VIEWER"

  - `createdAt` (string)
    When the membership was created

  - `updatedAt` (string)
    When the membership was last updated

  - `included` (object)
    Included related entities. Only populated when include parameter is specified.

  - `included.user` (object)

  - `included.user.id` (string, required)

  - `included.user.email` (string)

  - `included.user.identifierEmail` (string, required)
    Universal identifier email for deterministic operations. Generated from B2B inputs (email, externalId) for wallet salt generation and external integrations.
    Example: user123@user.pers.internal

  - `included.user.firstName` (string, required)
    User first name

  - `included.user.lastName` (string, required)
    User last name

  - `included.user.externalId` (string, required)
    User external id

  - `included.user.accountAddress` (string, required)
    User account address

  - `included.user.instagramAccountId` (string, required)
    Instagram account id

  - `included.user.googleAccountName` (string, required)
    Google account name

  - `included.user.customData` (object, required)
    Custom data

  - `included.user.publicProfile` (object, required)
    Public profile data

  - `included.user.isActive` (boolean, required)
    Is active

  - `included.user.currentSigningAccountId` (string)
    Current active signing account ID for external wallet operations

  - `included.user.wallets` (array, required)
    User-owned counterfactual smart contract wallets that can receive tokens

  - `included.user.wallets.id` (string, required)
    Unique identifier for the internal wallet

  - `included.user.wallets.ownerType` (string, required)
    Owner type for polymorphic ownership
    Enum: "user", "business", "tenant", "system", "external"

  - `included.user.wallets.ownerId` (string, required)
    Owner ID for polymorphic ownership
    Example: user_123

  - `included.user.wallets.walletManagementType` (string, required)
    Type of internal wallet
    Enum: "custodial", "non-custodial"

  - `included.user.wallets.address` (string, required)
    CREATE2 generated address that can receive tokens

  - `included.user.wallets.chainId` (number, required)
    Blockchain network chain identifier

  - `included.user.wallets.status` (string, required)
    Current status of the wallet
    Enum: "pending", "active", "suspended", "archived"

  - `included.user.wallets.ownerSigningAccountId` (string)
    ID of signing account that owns this internal wallet

  - `included.user.wallets.tags` (array, required)
    Tags associated with the wallet for categorization

  - `included.user.wallets.createdAt` (string, required)
    Timestamp when the wallet was created

  - `included.user.wallets.updatedAt` (string, required)
    Timestamp when the wallet was last updated

  - `included.user.createdAt` (string, required)
    Timestamp when the user was created

  - `included.user.updatedAt` (string, required)
    Timestamp when the user was last updated

  - `included.user.registrationSource` (object)
    Registration source tracking for analytics - captures channel and attribution when user was created
    Example: {"channel":"web","medium":"referral","campaign":"launch_2026"}

  - `included.user.lastActivityAt` (string)
    Last activity timestamp. Updated whenever user generates tokens (login or refresh). Tracks last time user was active (~1 hour precision).

  - `included.user.activityCount` (number)
    Total activity count. Increments on every token generation (login + refresh). Measures true user engagement.
    Example: 42

  - `included.user.included` (object)
    Included related entities. Only populated when include parameter is specified.

  - `included.user.included.statusTypes` (array)
    User status types earned based on token balances (via ?include=status)

  - `included.user.included.statusTypes.name` (string, required)
    User Status Type name

  - `included.user.included.statusTypes.description` (string)
    User Status Type description

  - `included.user.included.statusTypes.minTokenBalance` (string, required)
    User Status Type eligible Token Addresses

  - `included.user.included.statusTypes.discountPercentage` (number, required)
    User Status Type discount Rate in percentage

  - `included.user.included.statusTypes.imageUrl` (string)
    User Status Type image Url

  - `included.user.included.statusTypes.eligibleTokenAddresses` (array)
    Eligible token contract addresses for this status type
    Example: ["0x1234...","0x5678..."]

  - `included.user.included.statusTypes.tags` (array)
    Tags for categorization and filtering
    Example: ["vip","premium","gold"]

  - `included.user.included.statusTypes.order` (number)
    Explicit ordering for status hierarchy (higher = more prestigious). If not set, falls back to minTokenBalance for ordering.
    Example: 100

  - `included.user.included.statusTypes.id` (number, required)
    User Status Type id

  - `included.user.included.tokenBalances` (array)
    Token balances for user wallets (via ?include=balances)

  - `included.user.included.tokenBalances.accountAddress` (string, required)

  - `included.user.included.tokenBalances.tokenBalances` (array, required)

  - `included.user.included.tokenBalances.tokenBalances.contractAddress` (string, required)

  - `included.user.included.tokenBalances.tokenBalances.chainId` (number, required)

  - `included.user.included.tokenBalances.tokenBalances.balance` (number, required)

  - `included.user.included.tokenBalances.tokenBalances.tokenName` (string)

  - `included.user.included.tokenBalances.tokenBalances.tokenSymbol` (string)

  - `included.user.included.tokenBalances.tokenBalances.tokenType` (string, required)

  - `included.user.included.tokenBalances.tokenBalances.tokenId` (string, required)

  - `included.user.included.tokenBalances.tokenBalances.metadataUri` (string, required)

  - `included.user.included.tokenBalances.tokenBalances.metadata` (object, required)
    Token metadata (loaded from IPFS/storage when needed for filtering)

  - `included.business` (object)

  - `included.business.id` (string, required)
    The id of the business, this is unique and will be used to identify the business.

  - `included.business.email` (string, required)
    The email of the business, this is unique and will be used to identify the business.

  - `included.business.accountAddress` (string, required)
    The address of the business, this is the address that will be shown to the public.

  - `included.business.currentSigningAccountId` (string, required)
    Current active signing account ID for external wallet operations

  - `included.business.wallets` (array, required)
    Business-owned counterfactual smart contract wallets that can receive tokens

  - `included.business.businessLegalName` (string, required)
    The legal name of the business, this is the name that will be used for legal purposes.

  - `included.business.registrationNumber` (string, required)
    The business registration number (e.g., company registration, VAT number, EIN)

  - `included.business.displayName` (string, required)
    The display name of the business, this is the name that will be shown to the public.

  - `included.business.description` (string, required)
    The description of the business, this is the description that will be shown to the public.

  - `included.business.shortDescription` (string, required)
    The short description of the business, this is the description that will be shown to the public.

  - `included.business.websiteUrl` (string, required)
    The website of the business, this is the website that will be shown to the public.

  - `included.business.imageUrl` (string, required)
    The image of the business, this is the image that will be shown to the public.

  - `included.business.logoUrl` (string, required)
    Logo URL for the business

  - `included.business.streetAddress` (string, required)
    The address of the business, this is the address that will be shown to the public.

  - `included.business.phoneNumber` (string, required)
    The phone number of the business.

  - `included.business.neighborhood` (string, required)
    Neighborhood/area name (e.g., "West Bay", "Pearl Qatar", "Lusail") - auto-populated from geocoding

  - `included.business.district` (string, required)
    District/administrative area - auto-populated from geocoding

  - `included.business.city` (string, required)
    The city of the business, this is the city that will be shown to the public.

  - `included.business.postalCode` (string, required)
    The postal code of the business, this is the postal code that will be shown to the public.

  - `included.business.country` (string, required)
    The country of the business (auto-populated from geocoding if coordinates provided)

  - `included.business.countryCode` (string, required)
    ISO 3166-1 alpha-2 country code (e.g., QA, US, AE) - auto-populated from geocoding
    Example: QA

  - `included.business.coordsLatitude` (number, required)
    The latitude of the business, this is the latitude that will be shown to the public.

  - `included.business.coordsLongitude` (number, required)
    The longitude of the business, this is the longitude that will be shown to the public.

  - `included.business.businessType` (object, required)
    The business type of the business, this is the business type that will be shown to the public.

  - `included.business.businessType.id` (string)
    Business type id

  - `included.business.businessType.name` (string, required)
    Business type name

  - `included.business.businessType.description` (string, required)
    Business type description

  - `included.business.businessType.code` (string, required)
    Business type code

  - `included.business.businessType.iconUrl` (string, required)
    Business type icon url

  - `included.business.isActive` (boolean, required)
    The status of the business, this is the status that will be shown to the public.

  - `included.business.approval` (object, required)
    Approval metadata for this business.

  - `included.business.approval.status` (string, required)
    Approval state: pending_approval = awaiting admin review, approved = active, rejected = denied.
    Enum: "pending_approval", "approved", "rejected"

  - `included.business.approval.approvedAt` (string)
    Timestamp when the entity was approved or rejected by an admin.

  - `included.business.approval.approvedBy` (string)
    Admin user ID who approved or rejected this entity.

  - `included.business.approval.rejectionReason` (string)
    Reason provided when the entity was rejected.

  - `included.business.canMintToken` (boolean, required)
    The ability to mint token for the business, this is the ability that will be shown to the public.

  - `included.business.canChargeToken` (boolean, required)
    The ability to charge token for the business, this is the ability that will be shown to the public.

  - `included.business.canManageUsers` (boolean, required)
    The ability to manage users for the business, this is the ability that will be shown to the public.

  - `included.business.canReceiveDonation` (boolean, required)
    The ability to receive donation for the business, this is the ability that will be shown to the public.

  - `included.business.tags` (array, required)
    Tags for categorization and filtering

  - `included.business.customData` (object, required)
    Custom business data including Google Places information (placeID, currentOpeningHours)
    Example: {"placeID":"ChIJN1t_tDeuEmsRUsoyG83frY4","currentOpeningHours":{"open_now":true,"weekday_text":["Monday: 9:00 AM – 5:00 PM","Tuesday: 9:00 AM – 5:00 PM"]}}

