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

> Update credit limit for an agent in a space.

# Update credit limit for an agent in a space

The organization bot token must have the following scopes:

* `workflows:write`


## OpenAPI

````yaml openapi-adminApi.json PUT /v1/spaces/{space_id}/agents/{agent_id}/credit_limit
openapi: 3.1.0
info:
  title: Notion Admin API
  version: 1.0.0
  termsOfService: >-
    https://notion.notion.site/Terms-and-Privacy-28ffdd083dc3473e9c2da6ec011b58ac
servers:
  - url: https://api.notion.com/admin
security:
  - bearerAuth: []
tags:
  - name: Exports
    description: Workspace export endpoints
  - name: Legal holds
    description: Legal hold endpoints
  - name: Managed users
    description: Managed user endpoints
paths:
  /v1/spaces/{space_id}/agents/{agent_id}/credit_limit:
    put:
      tags:
        - Admin API
      summary: Update credit limit for an agent in a space
      operationId: update-agent-credit-limit
      parameters:
        - $ref: '#/components/parameters/notionVersion'
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              The ID of the custom agent (a UUID). The personal agent (Notion
              AI) is not supported.
        - name: space_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                credit_limit:
                  oneOf:
                    - type: number
                    - type: 'null'
                  description: >-
                    The per-agent credit limit as a non-negative integer, or
                    null to clear the limit.
              required:
                - credit_limit
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  credit_limit_by_workspace_admin:
                    oneOf:
                      - type: number
                      - type: 'null'
                    description: >-
                      The workspace admin credit limit after the change, or
                      `null` if no workspace admin limit applies.
                  enforced_credit_limit:
                    oneOf:
                      - type: number
                      - type: 'null'
                    description: >-
                      The credit limit that applies to the agent after the
                      change. This is the lower of the workspace admin limit and
                      the limit set by the agent creator. The workspace default
                      applies if neither limit is set. `null` means no limit
                      applies.
                  current_credit_usage:
                    oneOf:
                      - type: number
                      - type: 'null'
                    description: >-
                      The agent's credit usage in the current billing period, or
                      `null` if the billing period is unknown.
                  did_clear_paused_state:
                    type: boolean
                    description: >-
                      Whether this change resumed the agent after a credit-limit
                      or runaway-credit-usage pause.
                  is_active:
                    type: boolean
                    description: >-
                      Whether the agent is active after the change. `false` can
                      mean this change paused the agent or that the agent was
                      already paused for another reason.
                additionalProperties: false
                required:
                  - credit_limit_by_workspace_admin
                  - enforced_credit_limit
                  - current_credit_usage
                  - did_clear_paused_state
                  - is_active
        '400':
          description: The request body, path parameters, or query parameters are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError400'
              example:
                type: error
                code: validation_error
                status: 400
                message: The request body is invalid.
        '401':
          description: The request is missing a valid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError401'
              example:
                type: error
                code: unauthorized
                status: 401
                message: Unauthorized.
        '403':
          description: >-
            The authenticated bot does not have access to the requested resource
            or scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError403'
              example:
                type: error
                code: forbidden
                status: 403
                message: Forbidden.
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError404'
              example:
                type: error
                code: not_found
                status: 404
                message: Not found.
        '429':
          description: The request was rate limited.
          headers:
            retry-after:
              description: Seconds to wait before retrying the request.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError429'
              example:
                type: error
                code: rate_limited
                status: 429
                message: Rate limited.
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError500'
              example:
                type: error
                code: internal_server_error
                status: 500
                message: An unexpected error occurred.
components:
  parameters:
    notionVersion:
      name: Notion-Version
      in: header
      required: true
      schema:
        enum:
          - '2026-06-01'
      description: The Admin API version to use for this request.
  schemas:
    adminApiError400:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - validation_error
        status:
          enum:
            - 400
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError401:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - unauthorized
        status:
          enum:
            - 401
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError403:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - missing_scope
            - forbidden
        status:
          enum:
            - 403
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError404:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - not_found
        status:
          enum:
            - 404
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError429:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - rate_limited
        status:
          enum:
            - 429
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError500:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - internal_server_error
        status:
          enum:
            - 500
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````