Sharetribe icon

Sharetribe

Allows interaction with the Sharetribe Integration API

User → Update Permissions

AI-generated

Summary

Update a user's permission flags and optionally return a simplified user object.

Inputs

  • userId (required) — User's ID
  • simplify — Whether to return a simplified version of the response
  • userFields — Choose from the list, or specify IDs using an expression.
  • permissionsToUpdate — Select which permissions to update. Denying permissions is only effective with corresponding console configured access control.
  • canRead — Whether this user is allowed to view listings and related data (read permission)
  • canCreateListings — Whether this user is allowed to create listings (postListings permission)
  • canInitiateTransactions — Whether this user is allowed to initiate transactions (initiateTransactions permission)

Output shape

A user object containing the updated permission flags and the fields specified by userFields; if simplify is true the response is a simplified subset of user data, otherwise a full user object is returned.

The returned object always includes the updated permission flags; optional fields are included only when listed in userFields or when simplify is false. Pagination or error envelopes are not used for this operation.

Examples

Example 1: Update a specific user's permissions

userId = "550e8400-e29b-41d4-a716-446655440000", canRead = true, canCreateListings = false, canInitiateTransactions = true, simplify = false, userFields = ["email","firstName","lastName"]

Example 2: Return a simplified response for a user

userId = "550e8400-e29b-41d4-a716-446655440000", simplify = true, permissionsToUpdate = ["canRead","canCreateListings"]

Example 3: Batch update permissions across multiple users

Multiple calls with different userId values and corresponding permission settings; simplify = false, userFields = ["email","state"]

Links

Discussion