---
title: "Update YARA rule"
method: PUT
path: "/yara/{ruleName}"
---

# Update YARA rule

`PUT /yara/{ruleName}`

## Request

- Base URL: `https://sandbox.recordedfuture.com/api/v0`
- URL: `https://sandbox.recordedfuture.com/api/v0/yara/{ruleName}`
- Auth: API key in header `Authorization`

Update a YARA rule's source code and optionally rename it, with server-side recompilation.

## Path parameters

- `ruleName` string, required

## Request body

- object
  - `name` string: New rule filename (can be used to rename)
  - `rule` string: Updated YARA rule content

## Response `200`

Rule updated successfully.

- object: Empty response confirming update.

## Other responses

- `400`: Compilation error or invalid name.
- `404`: Rule not found.

---

[API](https://skmtc.dev/recordedfuture/apis/recorded-future-sandbox-api-secopsti.md) - [All operations](https://skmtc.dev/recordedfuture/apis/recorded-future-sandbox-api-secopsti/llms.txt) - [OpenAPI document](https://skmtc.dev/recordedfuture/apis/recorded-future-sandbox-api-secopsti/revisions/39ea918b1dca?raw)
