Skip to content

Skyvern: Deploy script

Skyvern scripts.deployScript: arguments, response, policy and SDK examples.

← Scripts operations · Get started

Operation skyvern.deploy_script_v1_scripts_script_id_deploy_post

Provider route: POST /v1/scripts/{script_id}/deploy. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/skyvern with npm, or alter-sdk-skyvern with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SkyvernIntegration } from "@alter-ai/skyvern";
async function execute(input: Parameters<SkyvernIntegration["scripts"]["deployScript"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SkyvernIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.scripts.deployScript(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_skyvern import SkyvernIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SkyvernIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.scripts.deploy_script(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.script_idstringRequired within parentThe unique identifier of the script
bodyModelRequired within parentExpand Deploy script — request body — body

Referenced models: Deploy script — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create script — response body

Referenced models: Create script — response body

Deploy script — request body — body
FieldTypePresenceDescription and constraints
$objectRootRequest model for deploying a script with updated files.
filesarrayRequired within parentArray of files to include in the script
files[]ModelEach itemExpand Deploy script — request body — body files item

Referenced models: Deploy script — request body — body files item

Create script — response body
FieldTypePresenceDescription and constraints
$objectRoot
created_atstringRequired within parentTimestamp when the script was created
Format: date-time
file_countJSONRequired within parent
file_count (anyOf 1)integerAlternativeTotal number of files in the script
file_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
file_treeobjectRequired within parentHierarchical file tree structure
Additional keys: see wildcard field
file_tree.*ModelAdditional keysExpand Create script — response body — file tree value
run_idJSONOptionalID of the workflow run or task run that generated this script
run_id (anyOf 1)stringAlternative
run_id (anyOf 2)nullAlternative
script_idstringRequired within parentUnique script identifier
versionJSONRequired within parent
version (anyOf 1)integerAlternativeScript version number
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Create script — response body — file tree value

Deploy script — request body — body files item
FieldTypePresenceDescription and constraints
$objectRootModel representing a file in a script.
contentstringRequired within parentBase64 encoded file content
encodingstringOptionalSupported file content encodings.
Content encoding
One of: base64, utf-8
Default: base64
mime_typeJSONOptionalMIME type (auto-detected if not provided)
mime_type (anyOf 1)stringAlternative
mime_type (anyOf 2)nullAlternative
pathstringRequired within parentFile path relative to script root
Create script — response body — file tree value
FieldTypePresenceDescription and constraints
$objectRootModel representing a file or directory in the file tree.
childrenJSONOptionalChild nodes for directories
children (anyOf 1)objectAlternativeAdditional keys: see wildcard field
children (anyOf 1).*ModelAdditional keysExpand Create script — response body — file tree value
children (anyOf 2)nullAlternative
content_hashJSONOptionalSHA256 hash of file content
content_hash (anyOf 1)stringAlternative
content_hash (anyOf 2)nullAlternative
created_atstringRequired within parentTimestamp when the file was created
Format: date-time
mime_typeJSONOptionalMIME type of the file
mime_type (anyOf 1)stringAlternative
mime_type (anyOf 2)nullAlternative
sizeJSONOptionalFile size in bytes
size (anyOf 1)JSONAlternative
size (anyOf 1) (anyOf 1)integerAlternative
size (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
size (anyOf 2)nullAlternative
typestringRequired within parentType of node: 'file' or 'directory'

Referenced models: Create script — response body — file tree value

SDK function policy ID: skyvern.deploy_script_v1_scripts_script_id_deploy_post. Catalog operation: deploy_script_v1_scripts__script_id__deploy_post. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.