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

# Update code review settings

> Change any of a project's Settings > Code fields; an omitted field is left unchanged and at least one must be sent. Turning on code review, review on push, pull request approval or Logging review needs the plan's code-review entitlement and code review to be available for the project. A custom git commit author needs both a name and an email. User credentials require settings:write permission in the project and the organization.



## OpenAPI

````yaml /openapi.json patch /projects/{projectId}/code-review-settings
openapi: 3.1.1
info:
  title: Sazabi Public API
  version: 1.0.0
  description: >
    Public REST API for Sazabi. Authenticate using a secret API key in the
    Authorization header.


    ## Pagination


    This API uses two pagination strategies depending on the endpoint type:


    ### Cursor-Based Pagination (List Endpoints)


    List endpoints (threads, messages, keys) use cursor-based pagination for
    efficient, consistent results:


    - **Parameters**: `limit` (items per page, default 50, max 100), `cursor`
    (opaque pagination token)

    - **Response**: Includes `nextCursor` field - pass this as `cursor` in the
    next request

    - **End of results**: When `nextCursor` is `null`, there are no more results

    - **Example**: `GET
    /v1/threads?limit=20&cursor=01234567-89ab-cdef-0123-456789abcdef`


    ### Page-Based Pagination (Search Endpoints)


    Search endpoints use page-based pagination due to the underlying search
    engine:


    - **Parameters**: `limit` (items per page, default 20, max 100), `page`
    (1-indexed page number)

    - **Response**: Includes `pagination` object with `page`, `limit`,
    `totalResults`, `totalPages`

    - **Example**: `GET /v1/search/threads?q=error&limit=10&page=2`
servers:
  - url: https://api.sazabi.com/v1
    description: Production
security: []
paths:
  /projects/{projectId}/code-review-settings:
    patch:
      tags:
        - Projects
      summary: Update code review settings
      description: >-
        Change any of a project's Settings > Code fields; an omitted field is
        left unchanged and at least one must be sent. Turning on code review,
        review on push, pull request approval or Logging review needs the plan's
        code-review entitlement and code review to be available for the project.
        A custom git commit author needs both a name and an email. User
        credentials require settings:write permission in the project and the
        organization.
      operationId: projects.codeReviewSettings.update
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID to fetch.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                codeReviewEnabled:
                  type: boolean
                  description: >-
                    Master switch for code review. Needs the plan's code-review
                    entitlement to turn on.
                codeReviewOnPushEnabled:
                  type: boolean
                  description: >-
                    Review new changes pushed to a pull request, not only when
                    it opens. Needs the code-review entitlement to turn on.
                codeReviewApprovalEnabled:
                  type: boolean
                  description: >-
                    Approve pull requests that review finds nothing to fix in.
                    Needs the code-review entitlement to turn on.
                securityReviewEnabled:
                  type: boolean
                  description: Run the automatic security review of this project's changes.
                loggingReviewEnabled:
                  type: boolean
                  description: >-
                    Turn Logging review on or off. Needs the code-review
                    entitlement to turn on.
                loggingReviewMode:
                  enum:
                    - suggest
                    - on_demand
                    - auto_commit
                  type: string
                  description: >-
                    How Logging review delivers changes: `suggest`, `on_demand`
                    or `auto_commit`.
                loggingReviewDailyCommitLimit:
                  anyOf:
                    - type: integer
                      minimum: 1
                      maximum: 100
                    - type: 'null'
                  description: >-
                    Most auto-commits Logging review makes per day (1 to 100);
                    null removes the limit.
                gitCommitAuthorMode:
                  enum:
                    - default
                    - custom
                  type: string
                  description: >-
                    `default` commits as Sazabi; `custom` uses
                    `gitCommitAuthorName` and `gitCommitAuthorEmail`, which must
                    then both be sent.
                gitCommitAuthorName:
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 255
                    - type: 'null'
                gitCommitAuthorEmail:
                  anyOf:
                    - type: string
                      maxLength: 320
                      format: email
                    - type: 'null'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  projectId:
                    type: string
                    format: uuid
                  codeReviewEnabled:
                    type: boolean
                    description: >-
                      Master switch: when off, Sazabi never reviews pull
                      requests for this project.
                  codeReviewOnPushEnabled:
                    type: boolean
                    description: >-
                      Review new changes pushed to a pull request, not only when
                      it opens.
                  codeReviewApprovalEnabled:
                    type: boolean
                    description: Approve pull requests that review finds nothing to fix in.
                  securityReviewEnabled:
                    type: boolean
                    description: >-
                      Run the automatic security review of this project's
                      changes.
                  loggingReviewEnabled:
                    type: boolean
                    description: >-
                      Logging review: review pull requests for missing or weak
                      logging.
                  loggingReviewMode:
                    enum:
                      - suggest
                      - on_demand
                      - auto_commit
                    type: string
                    description: >-
                      How Logging review delivers changes (only used while it is
                      enabled).
                  loggingReviewDailyCommitLimit:
                    anyOf:
                      - type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        exclusiveMinimum: 0
                      - type: 'null'
                    description: >-
                      Most auto-commits Logging review makes per day in
                      `auto_commit` mode; null for no limit.
                  gitCommitAuthorMode:
                    enum:
                      - default
                      - custom
                    type: string
                    description: >-
                      `default` commits as Sazabi; `custom` uses the name and
                      email.
                  gitCommitAuthorName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  gitCommitAuthorEmail:
                    anyOf:
                      - type: string
                      - type: 'null'
                required:
                  - projectId
                  - codeReviewEnabled
                  - codeReviewOnPushEnabled
                  - codeReviewApprovalEnabled
                  - securityReviewEnabled
                  - loggingReviewEnabled
                  - loggingReviewMode
                  - loggingReviewDailyCommitLimit
                  - gitCommitAuthorMode
                  - gitCommitAuthorName
                  - gitCommitAuthorEmail

````

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