Servebolt API (v1)
Submit feedback
Submit feedback
  1. Environments
  • Introduction
  • Auth
    • Signup
      POST
    • Login
      POST
    • User Info
      GET
    • Heartbeat
      GET
    • Refresh Token
      POST
    • Reset Password
      POST
    • Resend SMS verification code
      POST
    • Verify your phone number
      POST
    • MFA Challenge (OTP)
      POST
  • Bolts
    • Access
      • Invite User Contact
      • List Contacts
      • Update Contact Role
      • Delete Contact
    • Databases
      • List Bolt Databases
      • Get Bolt Database
      • Create Bolt Database
      • Update Bolt Database
      • Delete Bolt Database
    • Statistics
      • Dynamic Requests Statistics
      • TTFB Statistics
      • Storage Statistics
      • Content Type Statistics
      • Cache Statistics
      • Environments Dynamic Requests Statistics
      • Environments TTFB Statistics
      • Environments Storage Statistics
    • List Bolts
    • Bolt Name Validate
    • Available CMS
    • Create Bolt
    • Get Bolt
    • Get Bolt Environments
    • Update Bolt
    • Archive Bolt
    • Available PHP Versions
    • Get Bolt Subscription
    • Bolt Usage
    • Update Bolt Quota
    • Transfer Bolt Request
    • Transfer Bolt Request Copy
  • Environments
    • Git
      • Get Environment Git Status
      • Create Git Configuration
      • Update Git Configuration
      • Delete Environment Git Repository
      • Deploy Git Repository
      • Regenerate Git Public Key
      • Retrieve Git Repository Branches
      • Test Git Repository Connection
    • Domains
      • List Domains
      • List Environment Domains
      • Get Environment Domain
      • Create Domain Validation
      • Create Environment Domain
      • Delete Domain
      • Get Domain Certificates
      • Link Certificate to Domain
      • Unlink Certificate from Domain
    • Logs
      • Get Environment Apache Access Logs
      • Get Environment Apache Error Logs
      • Get Environment Cron Errors
    • List Environments
      GET
    • Create Environment
      POST
    • Get Environment
      GET
    • Update Environment
      PATCH
    • Delete Environment
      DELETE
    • Purge Environment Cache
      POST
    • List Environment Cronjobs
      GET
    • Get Environment Statistics
      GET
    • Get Environment Available Settings
      GET
    • Get Environment PHP Versions
      GET
    • Get Environment Usage
      GET
    • Get Environment SSH Accesses
      GET
    • Create Environment SSH Access
      POST
    • Remove Environment SSH Access
      DELETE
    • List Environment Databases
      GET
    • Toggle Environment Dev Mode
      POST
    • Environment Install Wordpress
      POST
    • Environment Optimize Wordpress
      POST
  • Locations
    • List Locations
    • Check SL8 Availability
    • Available Countries
  • Databases
    • List Databases
    • Get Database
    • Create Database
    • Update Database
    • Delete Database
    • Link Database
    • Unlink Database
    • Get Slow Queries
  • Cronjobs
    • List Cronjobs
    • Create Cronjob
    • Get Cronjob
    • Update Cronjob
    • Delete Cronjob
  • SSH Keys
    • List SSH Keys
    • Add a new SSH Key
    • Get SSH Key
    • Delete SSH Key
  • Certificates
    • List Certificate Orders
    • Get Certificate Order
    • Order new Certificate
    • Store custom certificate
    • Update Auto-Renewal
    • Verify DNS challenge
    • Delete Certificate Order
  • Billing
    • Pricing Calculator
    • Get Billing Customer Info
    • Update Bolt Subscription
    • List Invoices
    • Download Invoice
  • Profile
    • Get User Profile
    • Update User Profile
    • Update Profile Picture
    • Delete Profile Picture
  1. Environments

Update Environment

PATCH
/v1/environments/{id}
Update an environment's configuration.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
string 
required
Header Params
Accept
string 
required
Example:
application/json
Content-Type
string 
required
Example:
application/json
Body Params application/json
data
object 
required
attributes
object 
required
Example
{
  "data": {
    "attributes": {
      "title": "new name",
      "ssh": false,
      "sshPassword": "newPasswordSuperStrong",
      "sftp": false,
      "phpMemoryLimit": 256,
      "phpTimeZone": "Europe/Rome",
      "htaccessRoot": "none",
      "cacheMode": "none",
      "forceHTTPS": "domain.com",
      "forceDomain": {
        "https": true,
        "domain": "domain.com"
      },
      "environmentInfoFile": "json",
      "cloudflareLock": false,
      "phpVersion": "8.2",
      "phpExtensions": [
        85
      ]
    }
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.servebolt.io/v1/environments/' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "attributes": {
            "title": "new name",
            "ssh": false,
            "sshPassword": "newPasswordSuperStrong",
            "sftp": false,
            "phpMemoryLimit": 256,
            "phpTimeZone": "Europe/Rome",
            "htaccessRoot": "none",
            "cacheMode": "none",
            "forceHTTPS": "domain.com",
            "forceDomain": {
                "https": true,
                "domain": "domain.com"
            },
            "environmentInfoFile": "json",
            "cloudflareLock": false,
            "phpVersion": "8.2",
            "phpExtensions": [85]
        }
    }
}'

Responses

🟢200OK
application/json
Body
data
object 
required
id
string 
required
type
string 
required
attributes
object 
required
relationships
object 
required
links
object 
required
Example
{
  "data": {
    "id": "1803",
    "type": "environments",
    "attributes": {
      "title": "new name",
      "enabled": true,
      "hostname": "xxx",
      "ip": "185.91.65.xxx",
      "internalName": "newawe_1803",
      "internalUrl": "newawe-1803.xxx",
      "phpVersion": "8.2",
      "phpExtensions": [
        {
          "id": 85,
          "name": "ffi",
          "cli": true,
          "web": false
        }
      ],
      "phpWorkers": {
        "max": 128,
        "nice": 18,
        "maxRequests": 500
      },
      "domains": [],
      "state": "development",
      "storage": {
        "used": null,
        "total": 4096
      },
      "location": "Oslo, NO",
      "devMode": false,
      "apikey": "xxx",
      "isLegacy": false,
      "cloudflareLock": false,
      "cacheMode": "none",
      "environmentInfoFile": "json",
      "forceDomain": {
        "https": true,
        "domain": "domain.com"
      },
      "forceHTTPS": "domain.com",
      "phpMemoryLimit": 256,
      "htaccessRoot": "none",
      "ssh": false,
      "sftp": false,
      "phpTimezone": "UTC"
    },
    "relationships": {
      "bolt": {
        "data": {
          "id": "8988",
          "type": "bolts",
          "attributes": {
            "internalName": "wefwef_8988"
          }
        }
      }
    },
    "links": {
      "self": "https://xxx/v1/environments/1803"
    }
  }
}
Modified at 2024-10-30 14:22:17
Previous
Get Environment
Next
Delete Environment
Built with