Deploy script
curl --request POST \
--url https://api.skyvern.com/v1/scripts/{script_id}/deploy \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"content": "<string>",
"encoding": "base64",
"mime_type": "<string>"
}
]
}
'import requests
url = "https://api.skyvern.com/v1/scripts/{script_id}/deploy"
payload = { "files": [
{
"path": "<string>",
"content": "<string>",
"encoding": "base64",
"mime_type": "<string>"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
files: [
{
path: '<string>',
content: '<string>',
encoding: 'base64',
mime_type: '<string>'
}
]
})
};
fetch('https://api.skyvern.com/v1/scripts/{script_id}/deploy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skyvern.com/v1/scripts/{script_id}/deploy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'files' => [
[
'path' => '<string>',
'content' => '<string>',
'encoding' => 'base64',
'mime_type' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skyvern.com/v1/scripts/{script_id}/deploy"
payload := strings.NewReader("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\",\n \"encoding\": \"base64\",\n \"mime_type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skyvern.com/v1/scripts/{script_id}/deploy")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\",\n \"encoding\": \"base64\",\n \"mime_type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skyvern.com/v1/scripts/{script_id}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\",\n \"encoding\": \"base64\",\n \"mime_type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"script_id": "<string>",
"version": 123,
"file_count": 123,
"file_tree": {},
"created_at": "2023-11-07T05:31:56Z",
"run_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Scripts
Deploy script
Deploy a script with updated files, creating a new version
POST
/
v1
/
scripts
/
{script_id}
/
deploy
Deploy script
curl --request POST \
--url https://api.skyvern.com/v1/scripts/{script_id}/deploy \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"content": "<string>",
"encoding": "base64",
"mime_type": "<string>"
}
]
}
'import requests
url = "https://api.skyvern.com/v1/scripts/{script_id}/deploy"
payload = { "files": [
{
"path": "<string>",
"content": "<string>",
"encoding": "base64",
"mime_type": "<string>"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
files: [
{
path: '<string>',
content: '<string>',
encoding: 'base64',
mime_type: '<string>'
}
]
})
};
fetch('https://api.skyvern.com/v1/scripts/{script_id}/deploy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skyvern.com/v1/scripts/{script_id}/deploy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'files' => [
[
'path' => '<string>',
'content' => '<string>',
'encoding' => 'base64',
'mime_type' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skyvern.com/v1/scripts/{script_id}/deploy"
payload := strings.NewReader("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\",\n \"encoding\": \"base64\",\n \"mime_type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skyvern.com/v1/scripts/{script_id}/deploy")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\",\n \"encoding\": \"base64\",\n \"mime_type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skyvern.com/v1/scripts/{script_id}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"content\": \"<string>\",\n \"encoding\": \"base64\",\n \"mime_type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"script_id": "<string>",
"version": 123,
"file_count": 123,
"file_tree": {},
"created_at": "2023-11-07T05:31:56Z",
"run_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.
Path Parameters
The unique identifier of the script
Example:
"s_abc123"
Body
application/json
Request model for deploying a script with updated files.
Array of files to include in the script
Show child attributes
Show child attributes
Example:
{
"content": "cHJpbnQoIkhlbGxvLCBXb3JsZCEiKQ==",
"encoding": "base64",
"mime_type": "text/x-python",
"path": "src/main.py"
}
Response
Successful Response
Unique script identifier
Example:
"s_abc123"
Script version number
Example:
1
Total number of files in the script
Hierarchical file tree structure
Show child attributes
Show child attributes
Timestamp when the script was created
ID of the workflow run or task run that generated this script
Was this page helpful?
⌘I

