# Update script hook This function edits a script hook. Endpoint: GET /edit_hook Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `id` (string, required) The script hook's ID. To retrieve a hook's ID, use the WHM API 1 function. Example: "HzEpGvT6QGUYwxuX3hWB8AUq" - `check` (string) The absolute file path to the script that runs after the hook script to check the results. Example: "/scripts/postcourier-authlibup" - `enabled` (integer) Whether the hook script is enabled. * — Enabled. * — Disabled. Enum: 0, 1 - `escalateprivs` (integer) Whether to escalate privileges to run the hook script as root. * — Escalate privileges. * — Do escalate privileges. * This parameter applies to script hooks and module hooks. * Module hooks cannot escalate privileges. Enum: 0, 1 - `exectype` (string) The type of function that the script hook launches. * — Runs a script. * — Calls a function in a module. Enum: "script", "module" - `hook` (string) The hook script's absolute file path or its invocation. Example: "/scripts/postcourier-authlibup" - `notes` (string) The script hook's notes. Example: "Note." - `rollback` (string) The absolute file path to the script that rolls back the hook script. Example: "/scripts/postcourier-authlibup" - `stage` (string) The condition when the hook script executes. * — The script runs before the function. * — The script runs after the function. Enum: "pre", "post" - `weight` (integer) The script hook's priority in the hook's stage, where a lower value runs before a higher value. Example: 100 ## Response 200 fields (application/json): - `metadata` (object) - `metadata.command` (string) The method name called. Example: "edit_hook" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * — Success. * — Failed. Check the field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1