Replaces the file associated with an existing script. Upload the replacement file first and pass the returned fileID in this request.
https://{serverurl}/dcapi/configuration/scriptRepository/{scriptId}/file Copied!
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Unique identifier of the script whose file content is replaced. Fetch from List Scripts.
New content of the script file, as plain text.
Name of the script file, including its extension.
curl --request PUT \
--url https://appdomains/dcapi/configuration/scriptRepository/{scriptId}/file \
--header 'Accept: application/updateScriptFileStatus.v1+json' \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'Content-Type: application/scriptFileDetails.v1+json' \
--data '{"fileName":"MyScript.sh","content":"#!/bin/bash\necho '\''Hello World'\''\nexit 0"}'Replace the content of a Linux shell script
{
"fileName": "MyScript.sh",
"content": "#!/bin/bash\necho 'Hello World'\nexit 0"
}
Replace the content of a Windows batch script
{
"fileName": "Cleanup.bat",
"content": "@echo off\necho Running cleanup...\ndel /q C:\\Temp\\*.tmp\nexit /b 0"
}
false when the user does not have permission to modify the script file
Reason for access denial. Allowed values:
createdByDifferentUser
otherCustomerScript
Product error code for the authorization failure
Localised error message for the error code
Product error code for the failure
Localised error message for the error code
User does not have permission to modify this script file
{
"allowAccess": false
}
The API user does not have the role required for this operation
{
"errorCode": 1001,
"errorMsg": "Access denied - You are not allowed to access the requested resource."
}
Unexpected server error while modifying script file content
{
"errorCode": 1003,
"errorMsg": "An Internal Error occurred, try again later."
}
![]()
Duration: 1 minute | Threshold: 20 | Lock period: 5 minutes
Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.