---
title: "Deploy script"
method: POST
path: "/v1/scripts/{script_id}/deploy"
tags: ["Scripts"]
---

# Deploy script

`POST /v1/scripts/{script_id}/deploy`

Deploy a script with updated files, creating a new version

## Path parameters

- `script_id` string, required — The unique identifier of the script

## Headers

- `x-api-key` string, nullable — Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

## Request body

- DeployScriptRequest — Request model for deploying a script with updated files.
  - `files` ScriptFileCreate[], required — Array of files to include in the script
    - `path` string, required — File path relative to script root
    - `content` string, required — Base64 encoded file content
    - `encoding` 'base64' | 'utf-8' — Supported file content encodings.
    - `mime_type` string, nullable — MIME type (auto-detected if not provided)

## Response `200`

Successful Response

- CreateScriptResponse
  - `script_id` string, required — Unique script identifier
  - `version` integer, required — Script version number
  - `run_id` string, nullable — ID of the workflow run or task run that generated this script
  - `file_count` integer, required — Total number of files in the script
  - `file_tree` object, required — Hierarchical file tree structure
  - `created_at` string, date-time, required — Timestamp when the script was created

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/skyvern-ai/apis/skyvern-api-2.md) · [All operations](https://skmtc.net/skyvern-ai/apis/skyvern-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skyvern-ai/skyvern-api-2/versions/6e177b49046b/schema)
