Update post-install script
Update a specific post-install script. Use this endpoint to modify existing automation scripts.
Update a specific post-install script.
Use this endpoint to modify existing automation scripts.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
postInstallScriptIdintegerRequiredExample:
Post-install script ID
9568314Body
namestringRequiredExample:
Name of the script
My ScriptcontentstringRequiredExample:
Content of the script
#!/bin/bash echo 'Hello, World!'Responses
200
Success response
application/json
idintegerOptionalExample:
Post-install script ID
325namestringOptionalExample:
Name of the script
My Setup ScriptcontentstringOptionalExample:
Content of the script
#!/bin/bash\napt-get update\napt-get install -y nginxcreated_atstring · date-timeOptionalExample:
2025-02-27T11:54:22Zupdated_atstring · date-timeOptionalExample:
2025-03-19T11:54:22Z401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
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?