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

# Set automatic Git configuration apply

> Opt in or out of applying linked configuration on default-branch pushes. Requires environment write access and environment configuration feature access. Local-file sources cannot enable automatic apply.



## OpenAPI

````yaml /openapi.json patch /v1/environments/{environment_id}/config-source
openapi: 3.1.0
info:
  title: Replicas API
  version: 2.0.0
  description: >-
    Create and control workspaces, and manage the environments, automations, and
    learnings they run with.
servers:
  - url: https://api.replicas.dev
    description: Production API
security:
  - apiKey: []
tags:
  - name: Replica
    description: >-
      A replica is a Replicas workspace: a cloud sandbox where a coding agent
      works on your repositories.
  - name: Chats
    description: Manage the agent chats inside a replica.
  - name: Message queue
    description: Messages waiting for the agent to finish its turn.
  - name: Commands and terminals
    description: Run commands and open shells in a replica.
  - name: Pull requests
    description: Inspect and act on pull requests a replica opened.
  - name: Previews
    description: Public URLs for ports in a replica.
  - name: Canvas
    description: Plans, reports, and other files agents produce.
  - name: Sharing
    description: Add replicas to members' Shared view.
  - name: Environments
    description: >-
      Environments define what a workspace starts with. A fork builds on the
      environments it was forked from.
  - name: Environment variables
    description: Variables injected into workspaces.
  - name: Environment files
    description: Files written into workspaces.
  - name: Environment skills
    description: Agent skills installed into workspaces.
  - name: Environment MCPs
    description: MCP servers available to workspace agents.
  - name: Hooks
    description: Scripts that run when warm pool snapshots build and when workspaces start.
  - name: Warm pools
    description: Pre-built workspaces that start faster.
  - name: Automations
    description: Run agents on schedules and events.
  - name: Repositories
    description: Repositories connected to the organization.
  - name: Learnings
    description: Organization skills every workspace agent loads.
  - name: Agent credentials
    description: >-
      API keys and endpoints that coding agents use. Connect Claude, Codex, and
      Muse subscriptions with the CLI.
  - name: Plugins
    description: Connect integrations that workspace agents can use.
  - name: Organization
    description: Who you are and who is in your organization.
  - name: Billing
    description: Credit left, usage limits, and usage cost.
  - name: Audit log
    description: Who changed which configuration in the organization, and when.
  - name: Media
    description: Screenshots, recordings, and other files workspaces produce.
  - name: Slack
    description: Route Slack threads to workspaces.
  - name: Workspace identity
    description: OIDC keys for verifying workspace identity tokens.
paths:
  /v1/environments/{environment_id}/config-source:
    patch:
      tags:
        - Environments
      summary: Set automatic Git configuration apply
      description: >-
        Opt in or out of applying linked configuration on default-branch pushes.
        Requires environment write access and environment configuration feature
        access. Local-file sources cannot enable automatic apply.
      operationId: setEnvironmentConfigAutoApply
      parameters:
        - name: environment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - auto_apply
              properties:
                auto_apply:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          description: Updated configuration source
          content:
            application/json:
              schema:
                type: object
                properties:
                  source:
                    type: object
                    properties:
                      auto_apply:
                        type: boolean
        '403':
          description: Feature unavailable or missing write access
        '409':
          description: No linked Git source, source changed, or push events unavailable
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Organization or personal API key from **Settings → API Keys**.

````

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