Set member credit limits 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>

Sets or removes the credit limits of up to 200 members at once, the same way as Set member credit limit.

A limit can't be more than the workspace's monthly credits. Viewers can't have a limit, since they can't use credits, but you can remove one. The workspace owner is never limited.

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 who became a viewer, or whose membership changed, is skipped and keeps their limit.

Member credit limits need the Business plan or higher. Below it, this returns a 402.

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>

put/api/workspace/members/bulk/credit-limit

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/workspace/members/bulk/credit-limit
  • Auth: HTTP bearer

Query parameters

workspaceIdstring required

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": [
    {
      "credit_limit": 500,
      "email": "dana@acme.com"
    },
    {
      "email": "sam@acme.com"
    }
  ]
}

Response

The outcome for each member.

Example response

{
  "results": [
    {
      "email": "dana@acme.com",
      "message": "Member role updated to editor.",
      "status": "success"
    }
  ]
}

Changes