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

# Enable or pause a project's auto-scan-on-merge

> Sets whether automatic scan-on-merge is active for the project by creating or removing its `provider.push` event subscription. Disabling it does not cancel a scan already in progress, and re-enabling it does not retroactively scan commits merged while paused.



## OpenAPI

````yaml /api-reference/earnie/platform-openapi.json put /v1/projects/{projectId}/auto-scan
openapi: 3.0.3
info:
  title: Earnie Organization Settings API
  description: >-
    Read your organization, and read or change scan configuration, automatic
    scanning, pull request feedback, and local hook settings.
  version: 1.0.0
servers:
  - url: https://{tenant}.earnie.dev
    description: Your Earnie deployment
    variables:
      tenant:
        default: your-company
        description: >-
          Your organization's Earnie address, as shown in your browser when you
          sign in.
security:
  - bearerAuth: []
paths:
  /v1/projects/{projectId}/auto-scan:
    parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    put:
      tags:
        - organization
      summary: Enable or pause a project's auto-scan-on-merge
      description: >-
        Sets whether automatic scan-on-merge is active for the project by
        creating or removing its `provider.push` event subscription. Disabling
        it does not cancel a scan already in progress, and re-enabling it does
        not retroactively scan commits merged while paused.
      operationId: PutV1ProjectAutoScan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoScanSettings'
      responses:
        '200':
          description: The updated auto-scan-on-merge setting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoScanSettings'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient permissions (requires scanconfig:write)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Project not found in the caller's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AutoScanSettings:
      type: object
      description: >-
        Per-project opt-out for automatic scan-on-merge. `false` pauses
        automatic scan-on-merge for the project; the state is the project's
        `provider.push` event subscription — disconnecting the repository
        removes the subscription, and reconnecting it re-enables automatic
        scanning.
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Whether automatic scan-on-merge is active for this project.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An Earnie API key, sent as `Authorization: Bearer sk_earnie_...`. Create
        one under Settings > API keys. The key's scopes decide which operations
        it may call.

````

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