> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.sevalla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update static site

> Update one or more properties of an existing static site. Only include the fields you want to change - omitted fields are left unchanged. Changes to build settings take effect on the next deployment. When changing source or repo_url, the repository is validated against the Git provider.



## OpenAPI

````yaml https://api.sevalla.com/v3/openapi.json patch /static-sites/{id}
openapi: 3.1.0
info:
  title: Sevalla API docs
  version: 1.0.0
servers:
  - url: https://api.sevalla.com/v3
security:
  - bearerAuth: []
paths:
  /static-sites/{id}:
    patch:
      tags:
        - Static sites
      summary: Update static site
      description: >-
        Update one or more properties of an existing static site. Only include
        the fields you want to change - omitted fields are left unchanged.
        Changes to build settings take effect on the next deployment. When
        changing source or repo_url, the repository is validated against the Git
        provider.
      operationId: updateStaticSiteV3
      parameters:
        - schema:
            type: string
            format: uuid
            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
          in: path
          name: id
          required: true
          description: Static site identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  description: Human-readable name shown in the dashboard and API responses
                  example: My Static Site
                  type: string
                  minLength: 1
                  maxLength: 64
                auto_deploy:
                  description: >-
                    Enable or disable automatic deployments on every push to the
                    default branch
                  example: true
                  type: boolean
                default_branch:
                  description: >-
                    Git branch used for automatic and manual deployments when no
                    branch is explicitly specified
                  example: main
                  type: string
                  minLength: 1
                build_command:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: Command used to build the static site
                  example: npm run build
                node_version:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: Node.js version used to build the static site
                  example: '20'
                published_directory:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: Directory containing the built files to publish
                  example: dist
                is_preview_enabled:
                  description: >-
                    Enable or disable preview deployments for pull requests
                    targeting the default branch
                  example: false
                  type: boolean
                git_lfs_enabled:
                  description: >-
                    Enable or disable Git LFS during the source checkout step.
                    Enabled by default. When enabled, LFS objects are fetched on
                    every deployment. Disable to skip LFS downloads.
                  example: true
                  type: boolean
                install_command:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: >-
                    Command used to install dependencies before building the
                    static site
                  example: npm install
                root_directory:
                  description: Root directory of the project within the repository
                  example: .
                  anyOf:
                    - type: string
                    - type: 'null'
                index_file:
                  description: >-
                    Custom index file served as the entry point for the static
                    site
                  example: index.html
                  type: string
                  minLength: 1
                error_file:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: >-
                    Custom error page file served when a requested path is not
                    found
                  example: 404.html
                source:
                  type: string
                  enum:
                    - privateGit
                    - publicGit
                  description: >-
                    Where the static site source code comes from. `privateGit` -
                    private Git repository connected via OAuth. `publicGit` -
                    public Git repository URL.
                  example: privateGit
                git_type:
                  anyOf:
                    - type: string
                      enum:
                        - github
                        - bitbucket
                        - gitlab
                    - type: 'null'
                  description: >-
                    Git hosting provider for the repository. `github` - GitHub.
                    `bitbucket` - Bitbucket. `gitlab` - GitLab. Null for public
                    git sources.
                  example: github
                repo_url:
                  description: Full URL of the Git repository
                  example: https://github.com/user/static-site
                  type: string
                  minLength: 1
                allow_deploy_paths:
                  description: >-
                    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
                  type: array
                  items:
                    type: string
                ignore_deploy_paths:
                  description: >-
                    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
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    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)$
                    description: Unique identifier for the static site
                    example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                  display_name:
                    type: string
                    description: >-
                      Human-readable name shown in the dashboard and API
                      responses
                    example: My Static Site
                  auto_deploy:
                    type: boolean
                    description: >-
                      When enabled, a new deployment is automatically triggered
                      on every push to the default branch
                    example: true
                  default_branch:
                    type: string
                    description: >-
                      Git branch used for automatic and manual deployments when
                      no branch is explicitly specified
                    example: main
                  build_command:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Command used to build the static site
                    example: npm run build
                  node_version:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Node.js version used to build the static site
                    example: '20'
                  published_directory:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Directory containing the built files to publish
                    example: dist
                  is_preview_enabled:
                    type: boolean
                    description: >-
                      When enabled, preview deployments are created for pull
                      requests targeting the default branch
                    example: false
                  git_lfs_enabled:
                    type: boolean
                    description: >-
                      When enabled, Git LFS objects are fetched during the
                      source checkout step of a deployment. Enabled by default.
                      Disable this to skip LFS downloads and speed up checkout
                      when the repository contains LFS files that are not needed
                      at build time.
                    example: true
                  install_command:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Command used to install dependencies before building the
                      static site
                    example: npm install
                  root_directory:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Root directory of the project within the repository
                    example: /
                  index_file:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Custom index file served as the entry point for the static
                      site
                    example: index.html
                  error_file:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Custom error page file served when a requested path is not
                      found
                    example: 404.html
                  allow_deploy_paths:
                    type: array
                    items:
                      type: string
                    description: >-
                      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:
                    type: array
                    items:
                      type: string
                    description: >-
                      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:
                    type: string
                    enum:
                      - privateGit
                      - publicGit
                    description: >-
                      Where the static site source code comes from. `privateGit`
                      - private Git repository connected via OAuth. `publicGit`
                      - public Git repository URL.
                    example: privateGit
                  git_type:
                    anyOf:
                      - type: string
                        enum:
                          - github
                          - bitbucket
                          - gitlab
                      - type: 'null'
                    description: >-
                      Git hosting provider for the repository. `github` -
                      GitHub. `bitbucket` - Bitbucket. `gitlab` - GitLab. Null
                      for public git sources.
                    example: github
                  repo_url:
                    type: string
                    description: Full URL of the Git repository
                    example: https://github.com/user/static-site
                  updated_at:
                    type: string
                    format: date-time
                    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))$
                    description: >-
                      Timestamp when the static site was last modified, in ISO
                      8601 format
                    example: '2025-01-30T00:00:00.000Z'
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - deploymentInProgress
                          - deploymentFailed
                          - deploymentSuccess
                          - deploymentCancelled
                          - deleting
                          - deletionFailed
                      - type: 'null'
                    description: >-
                      Current status of the static site reflecting the most
                      recent deployment or lifecycle operation
                    example: deploymentSuccess
                required:
                  - id
                  - display_name
                  - auto_deploy
                  - default_branch
                  - build_command
                  - node_version
                  - published_directory
                  - is_preview_enabled
                  - git_lfs_enabled
                  - install_command
                  - root_directory
                  - index_file
                  - error_file
                  - allow_deploy_paths
                  - ignore_deploy_paths
                  - source
                  - git_type
                  - repo_url
                  - updated_at
                  - status
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Bad request
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 400
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 401
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 403
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not found
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Conflict
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 409
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Too many requests
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 429
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 500
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Pass your API key as a Bearer token in the
        Authorization header.

````