---
search:
  tags:
    - agents
    - PATCH
seo:
  description: >-
    Edit a guidance pack — bumps version and snapshots the… Reference for the
    PATCH /workspaces/{organizationId}/agent/guidance/{id} endpoint in the Pile
    API.
sidebar:
  label: Update agent guidance
  badge: PATCH
title: Update agent guidance
type: openapi-operation
---
Edit a guidance pack — bumps version and snapshots the revision. Sessions dispatched afterwards pick up the new version; existing sessions keep the refs they recorded.

`PATCH /workspaces/{organizationId}/agent/guidance/{id}`

**Request body** (`application/json`)

- `name` (string)
- `scope` (string)
- `scopeKey` (string | null)
- `body` (string)
- `links` (object[] | null)

Request body example:

```json
{
  "name": "string",
  "scope": "workspace",
  "scopeKey": "string",
  "body": "string",
  "links": [
    {
      "label": "string",
      "url": "string"
    }
  ]
}
```

**Responses**

- `200` — Guidance pack updated
- `404` — Guidance pack not found

Response example, 200:

```json
{
  "id": "string",
  "organizationId": "string",
  "name": "string",
  "scope": "workspace",
  "scopeKey": "string",
  "body": "string",
  "links": [
    {
      "label": "string",
      "url": "string"
    }
  ],
  "version": 0,
  "createdBy": "string",
  "updatedBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```
