---
title: "Update a playbook (bumps version)"
method: PATCH
path: "/api/workspaces/{workspaceId}/playbooks/{playbookId}"
tags: ["Playbooks"]
---

# Update a playbook (bumps version)

`PATCH /api/workspaces/{workspaceId}/playbooks/{playbookId}`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/workspaces/{workspaceId}/playbooks/{playbookId}`
- Auth: API key in cookie `hiveship_access`

## Path parameters

- `workspaceId` string, required
- `playbookId` string, required

## Request body

- object
  - `name` string
  - `triggerHint` string, nullable, required
  - `content` string

## Response `200`

Playbook updated

- object
  - `success` boolean, required
  - `data` object, required
    - `id` string, cuid, required
    - `workspaceId` string, cuid, required
    - `name` string, required
    - `triggerHint` string, nullable, required
    - `content` string
    - `version` integer, required
    - `createdAt` string, required
    - `updatedAt` string, required

## Other responses

- `400`: Validation error, or a playbook with that name exists
- `403`: Not workspace OWNER/ADMIN, or plan lacks the feature
- `404`: Playbook not found

---

[API](https://skmtc.dev/hiveship/apis/hiveship-api.md) · [All operations](https://skmtc.dev/hiveship/apis/hiveship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hiveship/apis/hiveship-api/revisions/73d3e26544e4?raw)
