---
title: "Edit custom rule"
method: PUT
path: "/repositories/sast/custom-rules/{rule_id}"
---

# Edit custom rule

`PUT /repositories/sast/custom-rules/{rule_id}`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/repositories/sast/custom-rules/{rule_id}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `custom_sast_rules:write`

Edit a custom semgrep rule

## Path parameters

- `rule_id` integer, required

## Request body

- object
  - `semgrep_rule` string, required: The semgrep rule
  - `issue_title` string, required: The title of the issue associated with this semgrep rule
  - `tldr` string, required: A summary of what the issue associated with this semgrep rule is
  - `how_to_fix` string, required: A description on how to fix the issue associated with this semgrep rule
  - `priority` integer, required: A numeric value from 1 to 100 indicating how severe the issue associated with this semgrep rule is
  - `language` 'JS' | 'TS' | 'PHP' | 'Java' | 'Scala' | 'GO' | 'PY' | 'Ruby' | '.NET' | 'RUST' | 'Dart' | 'Swift' | 'Elixir' | 'C' | 'Clojure' | 'kotlin' | 'terraform' | 'generic', required: The programming language associated with this semgrep rule

## Response `200`

The custom rule has successfully been updated

- object
  - `success` integer: the integer 1 indicating success

## Other responses

- `400`: One or more of the provided fields are invalid.

---

[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)
