---
title: "Save autofix settings"
method: PUT
path: "/projects/{id}/autofix"
tags: ["Autofix"]
---

# Save autofix settings

`PUT /projects/{id}/autofix`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/autofix`
- Auth: HTTP bearer

Saves the project's autofix settings. An omitted `max_stage` or
`auto_trigger` keeps its saved value, or takes its default when the
project has no saved settings, so `{"enabled": true}` on a new project
diagnoses every new or regressed issue and opens a draft pull request
with each fix. Set `max_stage` and `auto_trigger` to stop at a diagnosis
or to start runs only on request. Volcano picks the models a run uses.

Project access tokens are refused. Autofix opens pull requests in the
project's repository, so a person turns it on with a platform token.

During the preview, turning autofix on needs the SUPERAGENT plan, and
nothing is charged yet. Settings that are already on stay stored after
a downgrade, and saving them again is not refused, but no run starts
until the plan allows autofix again. Other saves need no plan.

Where autofix is not available, a project with saved settings can
still change them with `enabled: false`. Saving `enabled: true`
answers `404` with code `feature_unavailable`.

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateAutofixSettingsRequest
  - `enabled` boolean, required
  - `max_stage` 'diagnose' | 'pull_request': How far a run goes. Omitted, it keeps the saved value, or is `pull_request` when the project has no saved settings.
  - `auto_trigger` boolean: Whether a new or regressed issue starts a run on its own. Omitted, it keeps the saved value, or is `true` when the project has no saved settings.

## Response `200`

Saved

- AutofixSettings
  - `project_id` string, uuid, required
  - `enabled` boolean, required: Whether Volcano diagnoses the project's issues with AI.
  - `max_stage` 'diagnose' | 'pull_request', required: How far a run goes. Defaults to `pull_request`.
  - `auto_trigger` boolean, required: Whether a new or regressed issue starts a run on its own. Defaults to true. When false, runs start only on request.
  - `plan_includes_autofix` boolean: Whether the owner's plan includes autofix. When false, saved settings stay stored and no run starts. Absent when a save that needed no plan succeeded but the plan could not be resolved.
  - `updated_at` string, date-time: When the settings were last saved. Absent until the first save.

## Other responses

- `400`: The request body is invalid.
- `403`: The owner's plan does not allow autofix (during the preview it needs the SUPERAGENT plan), or the request used a project access token. Only a person changes autofix settings.
- `404`: Project not found. Code `feature_unavailable` means autofix is not available in this environment, which refuses turning it on and a project's first save.
- `501`: Autofix is not available in local mode.
- `503`: Turning autofix on needs the owner's plan, which could not be resolved. Nothing was saved. Retry later.

## Changes

- **2026-10-26** `4b0676e06128`: 8 breaking, 5 warning, 4 info
  - added `#/components/schemas/AutofixStage` to the `max_stage` request property `allOf` list
  - removed the enum value `diagnose` of the request property `max_stage`
  - removed the enum value `pull_request` of the request property `max_stage`
  - the `max_stage` request property type changed from `string` to no type
  - …13 more
- **2026-10-14** `d8d8f53d847b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/autofix/put.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
