---
title: "Update saved permission"
method: PATCH
path: "/api/permission/saved/{id}"
tags: ["permission"]
---

# Update saved permission

`PATCH /api/permission/saved/{id}`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/permission/saved/{id}`
- Auth: none required

Change the action or resource of a saved permission. Fails with a conflict when the project already has a saved permission with the same action and resource.

## Path parameters

- `id` string, required

## Request body

- object
  - `action` string, nullable
  - `resource` string, nullable

## Response `200`

Success

- object
  - `data` PermissionSavedInfo, required
    - `id` string, required
    - `projectID` string, required
    - `action` string, required
    - `resource` string, required
    - `time` object, required
      - `created` number, required
      - `updated` number, required

## Other responses

- `400`: InvalidRequestError
- `401`: UnauthorizedError
- `404`: PermissionSavedNotFoundError
- `409`: ConflictError

## Changes

> 50 revisions in range; 1 not diffed.

- **2026-10-25** `7565a68e48f6`: 1 breaking, 4 info
  - the response's body type changed from no type to `object` for status `404`
  - removed `#/components/schemas/PermissionSavedNotFoundErrorEncoded, #/components/schemas/LocationNotFoundErrorEncoded` from the response body `anyOf` list for the response status `404`
  - added the required property `_tag` to the response with the `404` status
  - added the required property `id` to the response with the `404` status
  - …1 more
- **2026-10-19** `8986ea6b603d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kaaass/apis/opencode/changes/api/permission/saved/:id/patch.md)

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
