---
title: "Change a script's title, slug, logline, format, genre or season."
method: PATCH
path: "/scripts/{scriptUploadId}"
tags: ["Scripts"]
---

# Change a script's title, slug, logline, format, genre or season.

`PATCH /scripts/{scriptUploadId}`

## Request

- Base URL: `https://docs.sleeperhit.studio/api/v1`
- URL: `https://docs.sleeperhit.studio/api/v1/scripts/{scriptUploadId}`
- Auth: HTTP bearer

The Writers Lab's edit dialog and season picker, through their core. Partial: only the fields sent change. `title` renames the latest version too; `slug` is refused when reserved or already one of yours; `logline` is the writer's own (the one Slug and the Writers Lab both read — coverage keeps its own reading); `genre` is free text up to 80 characters; `seasonNumber` moves an episode into that season of its project, adding the season to the project's list when it is new (a script in no project is refused). A bad value is refused with 400 `validation_failed`, the same sentence the Writers Lab shows. Free and naturally idempotent, so no `Idempotency-Key`.

## Request body

- ScriptMetadataPatch: Only the fields to change; the rest are untouched.
  - `title` string: Renames the latest version too.
  - `slug` string: Its URL slug; punctuation becomes dashes. Refused when reserved or already one of yours.
  - `logline` string, nullable: The writer's one-sentence logline; null or blank clears it.
  - `mediaType` 'film' | 'tv' | 'null', nullable: Null clears it.
  - `genre` string, nullable: Free text, in the writer's words (suggestions: Drama, Comedy, Thriller, Horror, Sci-Fi, Action, Romance, Crime, Fantasy, Animation, Musical, Mystery, Western, Other; a suggestion in any case is stored in its casing). Null or blank clears it.
  - `seasonNumber` integer: Moves an episode into that season of its project, adding the season when it is new. A script in no project is refused.

## Response `200`

The script as it now stands.

- WriterScriptEnvelope
  - `script` WriterScript, required
    - `scriptId` string, required
    - `routeId` string, required: The id in its Writers Lab URL.
    - `projectId` string, nullable, required: Its project, or null for a script in no project.
    - `title` string, required: The stored title.
    - `label` string, required: The name the episode is listed by everywhere, e.g. "S1E1 — The Return": its season and number with its title (a leading project name and episode code taken off); a script in no project is its title. Display only.
    - `slug` string, nullable, required: Its URL slug.
    - `logline` string, nullable, required: The writer's one-sentence logline — the same one Slug and the Writers Lab read and write.
    - `mediaType` string, nullable, required: `film` or `tv`.
    - `genre` string, nullable, required: Free text, in the writer's words.
    - `seasonNumber` integer, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `workspacePath` string, required: Where it opens in the Writers Lab, relative to the site origin.
    - `versions` WriterScriptVersion[], required: Newest first.
      - `scriptUploadId` string, required: The version's id: what coverage, overrides, table reads and exports take.
      - `versionNumber` integer, required
      - `title` string, required
      - `status` string, required: `draft` while it is being written; otherwise a locked version.
      - `parseStatus` string, nullable, required: Where the screenplay parse stands (`queued`, `parsing`, `complete`, `failed`); null when none ran.
      - `slug` string, nullable, required
      - `wordCount` integer, required
      - `pageCount` integer, nullable, required
      - `format` string, required: How it was written: text, fountain or fdx.
      - `createdAt` string, date-time, required
      - `counts` object, required: How much has been made from this version.
        - `coverageReports` integer, required
        - `tableReadJobs` integer, required
        - `pitchDeckJobs` integer, required
        - `visualizerJobs` integer, required

## Other responses

- `400`: Request payload failed validation. The error message names the offending field.
- `401`: Missing, malformed, revoked, or expired API key.
- `403`: API key is valid but lacks the scope, is blocked by IP allowlist, or the account is disabled.
- `404`: The named project or source does not exist or is owned by another account.
- `429`: Rate limit for this API key + IP + route family was exceeded.
- `500`: The API failed unexpectedly. Safe to retry with the same Idempotency-Key.

---

[API](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api.md) · [All operations](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/revisions/64c1102ccb2f?raw)
