> ## 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 access assignment

> Update credit access assignment.

The organization bot token must have the following scopes:

* `credit-limit-policy:write`

Moves a credit access assignment to another policy in the same workspace. The assignment keeps its `selector`. The new policy's limit applies right away.


## OpenAPI

````yaml openapi-adminApi.json PATCH /v1/spaces/{space_id}/policies/credit_access/assignments/{assignment_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}/policies/credit_access/assignments/{assignment_id}:
    patch:
      tags:
        - Admin API
      summary: Update credit access assignment
      operationId: update-credit-access-assignment
      parameters:
        - $ref: '#/components/parameters/notionVersion'
        - name: assignment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: ID of the credit access assignment.
        - name: space_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                policy_id:
                  type: string
                  format: uuid
                  description: ID of the policy to move the assignment to.
              required:
                - policy_id
              additionalProperties: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: credit_access_policy_assignment
                    description: Always `credit_access_policy_assignment`
                  id:
                    type: string
                    format: uuid
                    description: ID of the assignment.
                  space_id:
                    type: string
                    format: uuid
                    description: ID of the workspace the assignment belongs to.
                  version:
                    type: string
                    description: >-
                      Changes every time the assignment changes. Pass it as
                      `expected_version` to delete the assignment.
                  policy_id:
                    type: string
                    format: uuid
                    description: ID of the assigned policy.
                  selector:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            const: all_space_members
                            description: Always `all_space_members`
                        additionalProperties: false
                        required:
                          - type
                      - type: object
                        properties:
                          type:
                            type: string
                            const: user
                            description: Always `user`
                          user_id:
                            type: string
                            format: uuid
                            description: ID of a workspace member.
                        additionalProperties: false
                        required:
                          - type
                          - user_id
                      - type: object
                        properties:
                          type:
                            type: string
                            const: space_permission_group
                            description: Always `space_permission_group`
                          group_id:
                            type: string
                            format: uuid
                            description: ID of a permission group in the workspace.
                        additionalProperties: false
                        required:
                          - type
                          - group_id
                      - type: object
                        properties:
                          type:
                            type: string
                            const: scim_attribute
                            description: Always `scim_attribute`
                          attribute:
                            type: string
                            enum:
                              - cost_center
                              - department
                              - division
                              - user_type
                            description: SCIM user attribute to match.
                          value:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: >-
                              Attribute value to match. Members whose SCIM
                              attribute has this value are covered.
                        additionalProperties: false
                        required:
                          - type
                          - attribute
                          - value
                    description: Who the policy applies to.
                additionalProperties: false
                required:
                  - object
                  - id
                  - space_id
                  - version
                  - policy_id
                  - selector
        '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

````