Environments

Update environment

Update an environment.

patch/environments/{environment}

Request

  • Base URL
    https://cloud.laravel.com/api
  • Auth
    HTTP bearer

Path parameters

environmentstring required

The environment identifier

Request body

namestring
slugstring
color'blue' | 'green' | 'orange' | 'purple' | 'red' | 'yellow' | 'cyan' | 'gray'
branchstring
uses_push_to_deployboolean
uses_deploy_hookboolean
timeoutinteger

The number of seconds the environment will wait for your application to respond before timing out. Applies on the next deployment.

php_version'8.2:1' | '8.3:1' | '8.4:1' | '8.5:1'
build_commandstring nullable
node_version'20' | '22' | '24' | '26'
deploy_commandstring nullable
start_commandstring nullable

The command that starts a dynamic application, e.g. gunicorn myproject.wsgi. Required for dynamic JavaScript, Python, Ruby, Go, Rust and Java apps; prohibited for PHP apps and static websites.

uses_vanity_domainboolean
database_schema_idstring nullable

The identifier of the database schema to attach to the environment. Send null or an empty string to detach the database, or skip it entirely to leave it unchanged.

cache_idstring nullable

The identifier of the cache to attach to the environment. Send null or an empty string to detach the cache, or skip it entirely to leave it unchanged.

websocket_application_idstring nullable

The identifier of the WebSocket application to attach to the environment. Send null or an empty string to detach the WebSocket application, or skip it entirely to leave it unchanged.

uses_octaneboolean
sleep_timeoutinteger
hibernation_wake_up_intervalinteger nullable

The periodic wake-up interval in minutes for hibernating environments. Send null to disable, or a value between 1 and 10080 (7 days) to enable. Requires hibernation to be enabled.

shutdown_timeoutinteger

The number of seconds to wait before stopping the previous deployment's compute instances, allowing it to finish processing requests and jobs after a new deployment becomes active. Applies on the next deployment.

uses_purge_edge_cache_on_deployboolean
nightwatch_tokenstring nullable
cache_strategy'default' | 'bypass'
response_headers_frame'deny' | 'sameorigin' | 'all'
response_headers_content_type'nosniff' | 'none'
response_headers_robots_tag'index, follow' | 'noindex, nofollow'
firewall_block_pathboolean
firewall_browser_integrity_checkboolean

Example request

{
  "timeout": 30,
  "shutdown_timeout": 30
}

Response

EnvironmentResource

Changes

No recorded changes to this operation across all 1 revision of this API.