ChartnautDocs

Update script details

PATCH/scripts/{slug}

Changes a script's name, description or visibility without adding a version. The slug stays the same when the name changes.

Scope

Heavy call

Long poll

CLI

scripts:write

No

No

None

Guidance

  • Send only the fields to change. An empty object changes nothing and returns the script.

  • Renaming never moves the slug, so refs such as my-ema@3 in runs and studies keep working.

  • Making a script public lets other accounts run it by your-username/slug without seeing its source. Making it private again stops that.

  • A name you already use for another script of the same kind answers 409 conflict, and nothing changes.

  • The path takes the bare slug only. When one of your studies shares the slug, add kind.

Path parameters

Name

Type

Description

slug

string

Your script's bare slug

Query parameters

Name

Type

Required

Default

Description

kind

string

No

None

indicator, definition or study, when a study shares the slug

Request body

Every field is optional.

Field

Type

Required

Description

name

string

No

New display name

description

string

No

New description

visibility

string

No

private or public

Response

200 with the Script at its latest version, without files.

Status codes

Status

Code

Meaning

200

-

The change was made, or there was nothing to change

400

invalid_request

The path is not a bare slug, the body is not JSON, visibility is not valid, or Chartnaut refused the change. The message says why

403

forbidden

You cannot change this script

404

not_found

You have no script with that slug

409

conflict

A study shares the slug, so add kind, or the change clashes with another script