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

# Set a team's monthly credit limit

> Set, or remove with null, the credits all of the team's agents may use together per calendar month. When the limit is reached, every agent in the team pauses until it is raised or the month rolls over; it applies on top of each agent's own limits. Read the current limit and this month's usage from `/workspaceapi/teams/:teamId` and `/workspaceapi/credits`. Returns 400 when team settings are not enabled for the workspace.



## OpenAPI

````yaml /api-reference/workspace-api.json put /workspaceapi/teams/{teamId}/credit-limit
openapi: 3.1.0
info:
  title: Abundly Workspace API
  description: >-
    Workspace-level and per-agent data and administration. GET endpoints need a
    workspace API key (wk_) with the Workspace read API scope; POST, PUT, PATCH
    and DELETE endpoints need the Workspace write API scope, except sending and
    revoking invitations (POST and DELETE /workspaceapi/invites), which need the
    Invite members scope instead. The write endpoints mirror the Workspace
    Manager capability. Most are batch operations: ids travel in the JSON body,
    each id gets its own result, and per-id failures still return HTTP 200. The
    team endpoints (create, rename, members) act on a single team or membership
    and answer with standard status codes instead.


    Restricted and personal agents (`isPrivate`) are listed by
    /workspaceapi/agents but return 403 on every per-agent GET except
    promotion-requests, so enumerate from
    /workspaceapi/agents?includeOverview=true rather than iterating agent ids.
    Write endpoints can target restricted and personal agents.
  version: 1.0.0
servers:
  - url: https://service.abundly.ai
    description: Shared platform
  - url: https://{tenant}.service.abundly.ai
    description: Dedicated deployment
    variables:
      tenant:
        default: your-tenant
security:
  - workspaceApiKey: []
paths:
  /workspaceapi/teams/{teamId}/credit-limit:
    put:
      summary: Set a team's monthly credit limit
      description: >-
        Set, or remove with null, the credits all of the team's agents may use
        together per calendar month. When the limit is reached, every agent in
        the team pauses until it is raised or the month rolls over; it applies
        on top of each agent's own limits. Read the current limit and this
        month's usage from `/workspaceapi/teams/:teamId` and
        `/workspaceapi/credits`. Returns 400 when team settings are not enabled
        for the workspace.
      operationId: put-teams-teamId-credit-limit
      parameters:
        - name: teamId
          in: path
          required: true
          description: Team id.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                monthlyCreditLimit:
                  description: >-
                    Credits all of the team's agents may use together per
                    calendar month, or null to remove the limit.
                  anyOf:
                    - type: number
                      minimum: 0
                    - type: 'null'
              required:
                - monthlyCreditLimit
      responses:
        '200':
          description: Success. Empty result sets are also 200.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  monthlyCreditLimit:
                    description: The team's monthly credit limit; null when it has none.
                    anyOf:
                      - type: number
                      - type: 'null'
                  unchanged:
                    description: True when the team already had this limit.
                    type: boolean
                required:
                  - id
                  - name
                  - monthlyCreditLimit
                additionalProperties: false
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: >-
        Error. Every failure on this API returns JSON with a single `error`
        field.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: >-
                  Human-readable message. Every error on this API uses this
                  shape.
                type: string
            required:
              - error
            additionalProperties: false
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key (wk_). GET endpoints require the Workspace read API
        scope, POST, PUT, PATCH and DELETE endpoints the Workspace write API
        scope, and sending or revoking invitations (POST and DELETE
        /workspaceapi/invites) the Invite members scope. A key stops working
        when it expires or is disabled.

````

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