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

# Update a repo setting

> Change one repository settings row, named by the id list_repo_settings reports. Only the fields you send change, so sending fix_runner on its own is legal; a field sent as null is cleared (a null branch makes the row the all-branches row, a null service removes the alias). The repository itself cannot be changed here: a row for another repository is a create. Answers the repository in the shape list_repo_settings answers.



## OpenAPI

````yaml /api-reference/openapi.json put /repo_settings/{id}
openapi: 3.1.0
info:
  description: >-
    A resource-shaped endpoint onto the same tool surface the MCP server
    (/api/mcp) reaches. Every gate, refusal and audit row a caller sees here is
    the exact one the MCP endpoint answers for the same tool. Authenticated with
    an API key holding the api:admin scope, or the read-only api:config_read
    scope for GET alone.
  title: SRE Agent configuration API
  version: 1.0.0
servers:
  - url: https://sreagent.app/api/v1/config
security:
  - apiKey: []
tags:
  - name: ai_providers
  - name: ai_settings
  - name: alert_mutes
  - name: alert_routes
  - name: aws_external_id
  - name: certificate_monitors
  - name: change_notifications
  - name: compliance_periods
  - name: connectors
  - name: data_sources
  - name: deploy_policies
  - name: export
  - name: github_settings
  - name: image_targets
  - name: notification_settings
  - name: organization_settings
  - name: outbound_configs
  - name: outbound_rules
  - name: overseer_settings
  - name: prompt_templates
  - name: repo_settings
  - name: service_bindings
  - name: slack
  - name: slis
  - name: slos
  - name: status_page_components
  - name: status_page_incidents
  - name: status_page_settings
  - name: synthetic_checks
  - name: team_members
  - name: teams
  - name: ticket_import_rules
  - name: ticket_integrations
paths:
  /repo_settings/{id}:
    put:
      tags:
        - repo_settings
      summary: Update a repo setting
      description: >-
        Change one repository settings row, named by the id list_repo_settings
        reports. Only the fields you send change, so sending fix_runner on its
        own is legal; a field sent as null is cleared (a null branch makes the
        row the all-branches row, a null service removes the alias). The
        repository itself cannot be changed here: a row for another repository
        is a create. Answers the repository in the shape list_repo_settings
        answers.
      operationId: update_repo_settings
      parameters:
        - description: The resource's id.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                alerting_sns_topic_arn:
                  description: >-
                    The SNS topic ARN an "Alarm on this" pull request for this
                    repository should name in a generated alarm's alarm_actions,
                    when one already exists for this repository's AWS account
                    and region. Left unset, that pull request creates its own
                    topic and subscription the first time and reuses it (by
                    name) after that.
                  type: string
                auto_dispatch:
                  description: >-
                    true (the default) sends this repository's fix requests to
                    its runner as soon as they are made. false waits for a
                    person: every request, from any endpoint (the webhook
                    included), is created and its card says it is waiting, but
                    nothing is sent until someone presses Send on the card (or,
                    for a request with no card, in its Control Tower drawer).
                    Applies to the whole repository.
                  type: boolean
                branch:
                  description: >-
                    The branch this row applies to. Leave it out (or send null)
                    for the all-branches row, which is what a repository with
                    one fence wants.
                  type: string
                ci_fallback_to_platform:
                  description: >-
                    For a repository on "opencode_ci": when no CI run starts
                    within 5 minutes of the handover, send the same request to
                    SRE Agent's own agent once, instead of failing it. false
                    (the default) fails it, naming the likely causes. Applies to
                    the whole repository.
                  type: boolean
                environment:
                  description: >-
                    The environment this row describes, e.g. production.
                    Optional.
                  type: string
                fix_runner:
                  description: >-
                    Who executes this repository's fix requests: platform,
                    opencode_ci, self_hosted. "platform" is SRE Agent's own
                    agent and needs nothing installed. "opencode_ci" runs the
                    fix in a GitHub Actions workflow in your repository and
                    needs a plan that includes it. "self_hosted" runs the fix on
                    a runner you register for this organization and needs a plan
                    that includes it. The value applies to the whole repository,
                    so it moves every row the repository has.
                  type: string
                path_prefix:
                  description: >-
                    The one directory a proposed fix may write in, e.g.
                    "terraform/", or "." for the whole repository. Left out, it
                    is detected from the repository's layout the first time a
                    fix runs and recorded here. A leading slash matches nothing,
                    and .github/ is never writable whatever this says.
                  type: string
                service:
                  description: >-
                    The alias SLIs, deploy events and fix requests may name this
                    repository by. Optional: with no alias the repository's
                    short name is used.
                  type: string
                writable_extensions:
                  description: >-
                    The file suffixes a proposed fix may touch, each starting
                    with a dot (".tf", ".tfvars.json"). Defaults to .tf,
                    .tfvars, .yaml, .yml. At least one is required when the
                    field is sent.
                  items:
                    type: string
                  type: array
              required: []
              type: object
        required: false
      responses:
        '200':
          description: Updated.
        '201':
          description: Created (an upsert resource's PUT on a missing row).
        '404':
          description: No such resource.
        '412':
          description: If-Match named a version of the row that is no longer current.
        '422':
          description: The tool refused the request's shape or content.
        default:
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      description: The body of every failed request.
      properties:
        error:
          type: string
          description: >-
            A short machine-readable code such as forbidden, conflict or
            read_only_key.
        message:
          type: string
          description: A sentence that says what to change.
      required:
        - error
        - message
      additionalProperties: true
  securitySchemes:
    apiKey:
      description: >-
        An sre_ak_* API key holding the api:admin scope (or api:config_read,
        which every write refuses with read_only_key).
      scheme: bearer
      type: http

````

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