Skip to main content
PATCH
/
static-sites
/
{id}
Update static site
curl --request PATCH \
  --url https://api.sevalla.com/v3/static-sites/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "My Static Site",
  "auto_deploy": true,
  "default_branch": "main",
  "build_command": "npm run build",
  "node_version": "20",
  "published_directory": "dist",
  "is_preview_enabled": false,
  "install_command": "npm install",
  "root_directory": ".",
  "index_file": "index.html",
  "error_file": "404.html",
  "source": "privateGit",
  "git_type": "github",
  "repo_url": "https://github.com/user/static-site",
  "allow_deploy_paths": [
    "src/**",
    "package.json"
  ],
  "ignore_deploy_paths": [
    "docs/**",
    "README.md"
  ]
}
'
{
  "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "display_name": "My Static Site",
  "auto_deploy": true,
  "default_branch": "main",
  "build_command": "npm run build",
  "node_version": "20",
  "published_directory": "dist",
  "is_preview_enabled": false,
  "install_command": "npm install",
  "root_directory": "/",
  "index_file": "index.html",
  "error_file": "404.html",
  "allow_deploy_paths": [
    "src/**",
    "package.json"
  ],
  "ignore_deploy_paths": [
    "docs/**",
    "README.md"
  ],
  "source": "privateGit",
  "git_type": "github",
  "repo_url": "https://github.com/user/static-site",
  "updated_at": "2025-01-30T00:00:00.000Z",
  "status": "deploymentSuccess"
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Static site identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Body

application/json
display_name
string

Human-readable name shown in the dashboard and API responses

Required string length: 1 - 64
Example:

"My Static Site"

auto_deploy
boolean

Enable or disable automatic deployments on every push to the default branch

Example:

true

default_branch
string

Git branch used for automatic and manual deployments when no branch is explicitly specified

Minimum string length: 1
Example:

"main"

build_command
string | null

Command used to build the static site

Example:

"npm run build"

node_version
string | null

Node.js version used to build the static site

Example:

"20"

published_directory
string | null

Directory containing the built files to publish

Example:

"dist"

is_preview_enabled
boolean

Enable or disable preview deployments for pull requests targeting the default branch

Example:

false

install_command
string | null

Command used to install dependencies before building the static site

Example:

"npm install"

root_directory
string | null

Root directory of the project within the repository

Example:

"."

index_file
string

Custom index file served as the entry point for the static site

Minimum string length: 1
Example:

"index.html"

error_file
string | null

Custom error page file served when a requested path is not found

Example:

"404.html"

source
enum<string>

Where the static site source code comes from. privateGit - private Git repository connected via OAuth. publicGit - public Git repository URL.

Available options:
privateGit,
publicGit
Example:

"privateGit"

git_type
enum<string> | null

Git hosting provider for the repository. github - GitHub. bitbucket - Bitbucket. gitlab - GitLab. Null for public git sources.

Available options:
github,
bitbucket,
gitlab
Example:

"github"

repo_url
string

Full URL of the Git repository

Minimum string length: 1
Example:

"https://github.com/user/static-site"

allow_deploy_paths
string[]

Glob patterns for file paths that trigger a deployment. When set, only commits touching these paths trigger auto deploy. Mutually exclusive with ignore_deploy_paths.

Example:
["src/**", "package.json"]
ignore_deploy_paths
string[]

Glob patterns for file paths to exclude from deployment triggers. Commits that only touch ignored paths will not trigger auto deploy. Mutually exclusive with allow_deploy_paths.

Example:
["docs/**", "README.md"]

Response

Default Response

id
string<uuid>
required

Unique identifier for the static site

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

display_name
string
required

Human-readable name shown in the dashboard and API responses

Example:

"My Static Site"

auto_deploy
boolean
required

When enabled, a new deployment is automatically triggered on every push to the default branch

Example:

true

default_branch
string
required

Git branch used for automatic and manual deployments when no branch is explicitly specified

Example:

"main"

build_command
string | null
required

Command used to build the static site

Example:

"npm run build"

node_version
string | null
required

Node.js version used to build the static site

Example:

"20"

published_directory
string | null
required

Directory containing the built files to publish

Example:

"dist"

is_preview_enabled
boolean
required

When enabled, preview deployments are created for pull requests targeting the default branch

Example:

false

install_command
string | null
required

Command used to install dependencies before building the static site

Example:

"npm install"

root_directory
string | null
required

Root directory of the project within the repository

Example:

"/"

index_file
string | null
required

Custom index file served as the entry point for the static site

Example:

"index.html"

error_file
string | null
required

Custom error page file served when a requested path is not found

Example:

"404.html"

allow_deploy_paths
string[]
required

Glob patterns for file paths that trigger a deployment when changed. When set, only commits touching these paths will trigger auto deploy.

Example:
["src/**", "package.json"]
ignore_deploy_paths
string[]
required

Glob patterns for file paths to exclude from deployment triggers. Commits that only touch ignored paths will not trigger auto deploy.

Example:
["docs/**", "README.md"]
source
enum<string>
required

Where the static site source code comes from. privateGit - private Git repository connected via OAuth. publicGit - public Git repository URL.

Available options:
privateGit,
publicGit
Example:

"privateGit"

git_type
enum<string> | null
required

Git hosting provider for the repository. github - GitHub. bitbucket - Bitbucket. gitlab - GitLab. Null for public git sources.

Available options:
github,
bitbucket,
gitlab
Example:

"github"

repo_url
string
required

Full URL of the Git repository

Example:

"https://github.com/user/static-site"

updated_at
string<date-time>
required

Timestamp when the static site was last modified, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2025-01-30T00:00:00.000Z"

status
enum<string> | null
required

Current status of the static site reflecting the most recent deployment or lifecycle operation

Available options:
deploymentInProgress,
deploymentFailed,
deploymentSuccess,
deploymentCancelled,
deleting,
deletionFailed
Example:

"deploymentSuccess"