> ## 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 a credit limit policy.

# Update a credit limit policy

The organization bot token must have the following scopes:

* `credit-limit-policy:write`


## OpenAPI

````yaml openapi-adminApi.json PATCH /v1/spaces/{space_id}/credit_limit_policies/{policy_id}
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}/credit_limit_policies/{policy_id}:
    patch:
      tags:
        - Admin API
      summary: Update a credit limit policy
      operationId: update-credit-limit-policy
      parameters:
        - $ref: '#/components/parameters/notionVersion'
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              The current policy version ID. A successful update returns a new
              policy ID.
        - name: space_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: integer
                  minimum: 0
                  maximum: 10000000
                  description: Replacement monthly premium AI credit limit.
                expires_at:
                  type: integer
              required:
                - amount
              additionalProperties: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  policy:
                    type: object
                    properties:
                      amount:
                        type: integer
                      created_at:
                        type: integer
                      created_by_id:
                        type: string
                        format: uuid
                      created_by_table:
                        type: string
                        const: notion_user
                        description: Always `notion_user`
                      credit_type_unit:
                        type: string
                        enum:
                          - basic_ai_credits
                          - exempt_ai_credits
                          - premium_ai_credits
                          - preview_ai_credits
                        description: >-
                          One of: `basic_ai_credits`, `exempt_ai_credits`,
                          `premium_ai_credits`, `preview_ai_credits`
                      id:
                        type: string
                        format: uuid
                      selector:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: all_space_members
                                description: Always `all_space_members`
                            additionalProperties: false
                            required:
                              - type
                          - type: object
                            properties:
                              space_user_id:
                                example: >-
                                  3f2b25f3-0a52-4a90-8f0d-5a3f0e6c1d2e|3f2b25f3-0a52-4a90-8f0d-5a3f0e6c1d2e
                                pattern: >-
                                  ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-(?:4[0-9a-fA-F]{3}|8[0-3][0-9a-fA-F]{2})-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}\|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-(?:4[0-9a-fA-F]{3}|8[0-3][0-9a-fA-F]{2})-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
                                type: string
                              type:
                                type: string
                                const: space_user
                                description: Always `space_user`
                            additionalProperties: false
                            required:
                              - space_user_id
                              - type
                        description: >-
                          All workspace members or one workspace member affected
                          by the policy.
                      space_id:
                        type: string
                        format: uuid
                      expires_at:
                        type: integer
                    additionalProperties: false
                    required:
                      - amount
                      - created_at
                      - created_by_id
                      - created_by_table
                      - credit_type_unit
                      - id
                      - selector
                      - space_id
                additionalProperties: false
                required:
                  - policy
        '400':
          description: The request body, path parameters, or query parameters are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiPublicError400'
              example:
                object: 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/adminApiPublicError401'
              example:
                object: 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/adminApiPublicError403'
              example:
                object: error
                code: restricted_resource
                status: 403
                message: Forbidden.
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiPublicError404'
              example:
                object: error
                code: object_not_found
                status: 404
                message: Not found.
        '409':
          description: The request conflicts with the current state of the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiPublicError409'
              example:
                object: error
                code: conflict_error
                status: 409
                message: The request conflicts with the current resource state.
        '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/adminApiPublicError429'
              example:
                object: error
                code: rate_limited
                status: 429
                message: Rate limited.
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiPublicError500'
              example:
                object: error
                code: internal_server_error
                status: 500
                message: An unexpected error occurred.
        '503':
          description: A required service is temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiPublicError503'
              example:
                object: error
                code: service_unavailable
                status: 503
                message: Service temporarily unavailable.
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:
    adminApiPublicError400:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - validation_error
        status:
          enum:
            - 400
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError401:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - unauthorized
        status:
          enum:
            - 401
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError403:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - restricted_resource
        status:
          enum:
            - 403
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError404:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - object_not_found
        status:
          enum:
            - 404
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError409:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - conflict_error
        status:
          enum:
            - 409
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError429:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - rate_limited
        status:
          enum:
            - 429
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError500:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - internal_server_error
        status:
          enum:
            - 500
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
    adminApiPublicError503:
      type: object
      properties:
        object:
          enum:
            - error
        code:
          enum:
            - service_unavailable
        status:
          enum:
            - 503
        message:
          type: string
        additional_data:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
      required:
        - object
        - code
        - status
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````