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

# Set repo auto-forwarding

> Set default auto-forwarding value, which determines whether they automatically advance to the latest commit when their branch receives new commits. This only affects workspaces created after this setting is changed. Existing workspaces retain their current auto-forwarding status.



## OpenAPI

````yaml post /repos/{repo_id}/set_def_auto_forwarding
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/{repo_id}/set_def_auto_forwarding:
    parameters:
      - $ref: '#/components/parameters/RepoParam'
    post:
      tags:
        - Repository Manipulation
      summary: Set repo auto-forwarding
      description: >-
        Set default auto-forwarding value, which determines whether they
        automatically advance to the latest commit when their branch receives
        new commits. This only affects workspaces created after this setting is
        changed. Existing workspaces retain their current auto-forwarding
        status.
      operationId: src.handlersv2.repo.set_def_workspace_auto_forwarding
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceAutoForwarding'
      responses:
        '204':
          $ref: '#/components/responses/OKEmpty'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/write
components:
  parameters:
    RepoParam:
      in: path
      name: repo_id
      required: true
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
      description: >-
        The repo ID of the repository. Repo _name_ can be used instead of the
        ID, but usage of ID for permanent linking and API requests is preferred.
  schemas:
    WorkspaceAutoForwarding:
      type: object
      description: >-
        Set whether a workspace will automatically advance to the latest commit
        when its branch receives new commits.
      properties:
        ws_auto_forwarding_status:
          type: string
          enum:
            - enabled
            - disabled
          description: workspace auto-forwarding status
      required:
        - ws_auto_forwarding_status
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        detail:
          type: string
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
  responses:
    OKEmpty:
      description: Request completed successfully
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````