---
title: "Update a script"
method: PATCH
path: "/scripts/{name}"
tags: ["Scripts"]
---

# Update a script

`PATCH /scripts/{name}`

Update a project script's body and/or description.

## Path parameters

- `name` string, required — Script to update.

## Request body

- object
  - `projectId` string, uuid — Project that owns the script. Auto-filled from CLI and SDK context when omitted.
  - `content` string — New script body. Omit to leave content unchanged.
  - `description` string, nullable — New description, or null to clear it. Omit to leave unchanged.

## Response `200`

OK

- object
  - `script` object, required
    - `id` string, uuid, required
    - `projectId` string, uuid, required
    - `name` string, required
    - `description` string, nullable, required
    - `contentHash` string, required — sha256 hex digest of the script content.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `content` string, required — Bash script body materialized as /home/sazabi/scripts/<name>.sh in the sandbox.

---

[API](https://skmtc.dev/sazabi/apis/sazabi-public-api.md) · [All operations](https://skmtc.dev/sazabi/apis/sazabi-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sazabi/sazabi-public-api/revisions/1d12b71c735a/schema)
