> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Set member credit limit

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Sets the most credits a member can use in a workspace each month, or removes their own limit when `credit_limit` is `null`. A member without their own limit gets the workspace default from [Set default member credit limit](/api-reference/set-default-member-credit-limit), if there is one.

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. Setting the same limit again changes nothing, so retrying is safe.

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

This is limited to 30 requests per minute, shared with [Update workspace member role](/api-reference/update-workspace-member-role), [Remove workspace member](/api-reference/remove-workspace-member), [Set member credit limit](/api-reference/set-member-credit-limit), and [Set default member credit limit](/api-reference/set-default-member-credit-limit). 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>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json put /api/workspace/members/{email}/credit-limit
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/workspace/members/{email}/credit-limit:
    put:
      summary: Set member credit limit
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Sets the most credits a member can use in a workspace each month, or
        removes their own limit when `credit_limit` is `null`. A member without
        their own limit gets the workspace default from [Set default member
        credit limit](/api-reference/set-default-member-credit-limit), if there
        is one.


        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. Setting the same limit again
        changes nothing, so retrying is safe.


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


        This is limited to 30 requests per minute, shared with [Update workspace
        member role](/api-reference/update-workspace-member-role), [Remove
        workspace member](/api-reference/remove-workspace-member), [Set member
        credit limit](/api-reference/set-member-credit-limit), and [Set default
        member credit limit](/api-reference/set-default-member-credit-limit). 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>
      operationId: >-
        update_member_credit_limit_api_workspace_members__email__credit_limit_put
      parameters:
        - name: email
          in: path
          required: true
          schema:
            type: string
            description: >-
              Email of the member whose limit to set, exactly as `email` in
              [List workspace members](/api-reference/list-workspace-members)
              returns it. Matching is exact, including case. URL-encode it: `@`
              as `%40` and `+` as `%2B`.
            title: Email
          description: >-
            Email of the member whose limit to set, exactly as `email` in [List
            workspace members](/api-reference/list-workspace-members) returns
            it. Matching is exact, including case. URL-encode it: `@` as `%40`
            and `+` as `%2B`.
          example: dana@acme.com
        - name: workspaceId
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: >-
              ID of the workspace. With a personal access token, use the token's
              workspace. Get it from `organization_id` in [Get
              app](/api-reference/get-app).
            title: Workspaceid
          description: >-
            ID of the workspace. With a personal access token, use the token's
            workspace. Get it from `organization_id` in [Get
            app](/api-reference/get-app).
          example: 67e0b12c4d8a3f005b21c9e4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemberCreditLimitRequest'
      responses:
        '200':
          description: The member's limit changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeResult'
              example:
                status: success
                message: Credit limit updated for dana@acme.com.
        '400':
          description: >-
            The limit is more than the workspace's monthly credits, or the
            member is a viewer.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: The workspace's plan doesn't include member credit limits.
        '403':
          description: >-
            You aren't an owner or admin of the workspace, your token is for a
            different workspace or is read-only, or your credential can't be
            used on this endpoint.
        '404':
          description: No member or pending invitation with this email in the workspace.
        '409':
          description: Your workspace requires an unlocked SSO session.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    UpdateMemberCreditLimitRequest:
      properties:
        credit_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Credit Limit
          description: >-
            Most credits the member can use in the workspace each month, at
            least 1. `null`, or leaving it out, removes their own limit, so the
            workspace default applies.
          example: 500
      type: object
      title: UpdateMemberCreditLimitRequest
      description: A member's credit limit.
    ChangeResult:
      properties:
        status:
          type: string
          const: success
          title: Status
          description: Always `success`.
          example: success
        message:
          type: string
          title: Message
          description: Short confirmation. Its wording can change, so don't parse it.
          example: Members added to group.
      type: object
      required:
        - status
        - message
      title: ChangeResult
      description: Confirms the change.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.