Skip to content
Select themeSelect language

`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}
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" }'
id
required
string format: uuid
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"
}
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"
}