For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update post-install script

Update a specific post-install script. Use this endpoint to modify existing automation scripts.

Update post-install script

put

Update a specific post-install script.

Use this endpoint to modify existing automation scripts.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
postInstallScriptIdintegerRequired

Post-install script ID

Example: 9568314
Body
namestringRequired

Name of the script

Example: My Script
contentstringRequired

Content of the script

Example: #!/bin/bash echo 'Hello, World!'
Responses
200

Success response

application/json
idintegerOptional

Post-install script ID

Example: 325
namestringOptional

Name of the script

Example: My Setup Script
contentstringOptional

Content of the script

Example: #!/bin/bash\napt-get update\napt-get install -y nginx
created_atstring · date-timeOptionalExample: 2025-02-27T11:54:22Z
updated_atstring · date-timeOptionalExample: 2025-03-19T11:54:22Z
put/api/vps/v1/post-install-scripts/{postInstallScriptId}
PUT /api/vps/v1/post-install-scripts/{postInstallScriptId} HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "name": "My Script",
  "content": "#!/bin/bash\n\necho 'Hello, World!'"
}
{
  "id": 325,
  "name": "My Setup Script",
  "content": "#!/bin/bash\\napt-get update\\napt-get install -y nginx",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}

Last updated

Was this helpful?