`PATCH /api/scripts/{id}` — update name / slug / language / description / source. Each field is optional; an absent field is left alone. The description field is three-state (see deserialize_description_field).
PATCH
/api/scripts/{id}
const url = 'https://example.com/api/scripts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"description":"example","language":"example","name":"example","slug":"example","source":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/scripts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "language": "example", "name": "example", "slug": "example", "source": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
description
Three-state per the service contract:
- field absent /
null→ leave the stored description alone. - non-empty string → overwrite.
- empty string → clear.
string | null
language
string | null
name
string | null
slug
string | null
source
string | null
Examplegenerated
{ "description": "example", "language": "example", "name": "example", "slug": "example", "source": "example"}Responses
Section titled “Responses”Media typeapplication/json
Wire-shape Script view returned by every HTTP handler. Mirrors the DB
row 1:1; the created_by is included so the UI can show “Created by
you” without a second lookup.
object
created_at
required
string format: date-time
created_by
string | null format: uuid
description
string | null
id
required
string format: uuid
language
required
string
name
required
string
slug
required
string
source
required
string
updated_at
required
string format: date-time
workspace_id
required
string format: uuid
Examplegenerated
{ "created_at": "2026-04-15T12:00:00Z", "created_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "description": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "language": "example", "name": "example", "slug": "example", "source": "example", "updated_at": "2026-04-15T12:00:00Z", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}