Update workspace member roles in bulk
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Changes the roles of up to 200 members at once, the same way as Update workspace member role.
You can't change your own role or the owner's. A role that a group grants can only be changed at the group, with Update workspace group or by changing its members. admin needs the Business plan or higher. Moving someone to viewer removes their own credit limit, and promoting a guest makes them a full member.
Every item is checked before anything changes. If any item can't be applied, nothing changes and the request returns a 400 whose detail.errors lists each rejected item with its email, a message, and an error_code when there is one. A member who isn't in the workspace, or a change you couldn't make on the single-member endpoint, is reported there rather than as a 403 or 404.
A 200 has one entry in results per item, in request order. An item whose member changed while the request ran comes back with status skipped and wasn't applied. Count only success entries as done. A member whose role a group took over, or whose membership changed, is skipped and keeps their role.
This is limited to 5 requests per minute, shared by Update workspace member roles in bulk, Remove workspace members in bulk, and Set member credit limits in bulk. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.
<Note>Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused, and workspace API keys aren't accepted.</Note>
Request
- Base URL: https://app.base44.com
- URL: https://app.base44.com/api/workspace/members/bulk/role
- Auth: HTTP bearer
Query parameters
ID of the workspace. With a personal access token, use the token's workspace. Get it from organization_id in Get app.
Request body
Example request
{
"items": [
{
"email": "dana@acme.com",
"role": "editor"
},
{
"email": "sam@acme.com",
"role": "viewer"
}
]
}Response
The outcome for each member.
Example response
{
"results": [
{
"email": "dana@acme.com",
"message": "Member role updated to editor.",
"status": "success"
}
]
}Changes
- ○
endpoint added
- ○