---
title: "Update Pentest AutoFix PR creation settings"
method: PUT
path: "/repositories/autofix/pentest/settings"
---

# Update Pentest AutoFix PR creation settings

`PUT /repositories/autofix/pentest/settings`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/repositories/autofix/pentest/settings`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `autofix:write`

Update the workspace Pentest & AI Code Analysis AutoFix PR creation settings. PRs are created and re-evaluated every day. Use severity_filter to set which severities to autofix. Use repos_scope of "all" or "selected"; when "selected", pass repository IDs in repo_ids. Inactive or unknown repository IDs are filtered out. "all" is paying accounts only. repos_scope is optional and defaults to "all" for backwards compatibility. Send enabled: false to turn Pentest AutoFix off; the other fields are then ignored. This only affects Pentest AutoFix, other AutoFix features keep their own settings.

## Request body

- union
  - object
    - `enabled` true, required: Enables automatic Pentest & AI Code Analysis AutoFix PR creation.
    - `severity_filter` 'all' | 'critical_and_high_only', required: Severity filter for Pentest & AI Code Analysis autofix.
    - `repos_scope` 'all' | 'selected': Repository scope for Pentest & AI Code Analysis autofix: all repositories or a selected list. "all" is paying accounts only. Optional; omitting it defaults to "all".
    - `repo_ids` integer[]: Code repository IDs for Pentest & AI Code Analysis autofix when repos_scope is "selected". Ignored when scope is "all"; use an empty array in that case. Inactive or unknown repository IDs are filtered out and not stored.
  - object
    - `enabled` false, required: Disables automatic Pentest & AI Code Analysis AutoFix PR creation. The other fields are ignored and may be omitted.

## Response `200`

The Pentest AutoFix settings were updated.

- object
  - `success` integer: 1 indicating success

## Other responses

- `400`: Invalid configuration (e.g. select all on a non-paying account).

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
