---
title: "Edit Instruction"
method: PATCH
path: "/v1/agents/{agent_id}/instructions/edit"
tags: ["Agents"]
---

# Edit Instruction

`PATCH /v1/agents/{agent_id}/instructions/edit`

## Request

- Base URL: `https://client.api.prod.orsay.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://client.api.prod.orsay.ai/v1/agents/{agent_id}/instructions/edit`
- Auth: HTTP bearer

Replace an existing instruction snippet with a revised version in the
agent's published specs (used by the feedback flow to rewrite an existing
instruction instead of only appending a new one).

## Path parameters

- `agent_id` string, uuid, required

## Request body

- EditInstructionRequest
  - `existingInstruction` string, required
  - `revisedInstruction` string, required
  - `target` 'general' | 'followUp' | 'response', required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/orsay/apis/orsay-api.md) - [All operations](https://skmtc.dev/orsay/apis/orsay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orsay/apis/orsay-api/revisions/988a26cafef5?raw)
