Adds a new script to the repository. Validates storage availability, secures filename, checks for duplicates (appends suffix if found), copies the file, generates SHA256 checksums, inserts DB records, and optionally shares the script.
post /dcapi/configuration/scriptRepository/script
https://{server-hostname}:8383/dcapi/configuration/scriptRepository/script
Common.CREATECopied!
Authorization: d92d4xxxxxxxxxxxxx15f52
curl --request POST \
--url https://appdomain/dcapi/configuration/scriptRepository/script \
--header 'Accept: application/addScriptStatus.v1+json' \
--header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \
--header 'Content-Type: application/scriptDetails.v1+json' \
--data '{"description":"My custom script for deployment","exitCodes":"0","arguments":"--verbose","scriptFile":{"fileID":12345},"shareScript":false,"platform":"Windows"}'Add a new Windows script to the repository
{
"description": "My custom script for deployment",
"exitCodes": "0",
"arguments": "--verbose",
"scriptFile": {
"fileID": 12345
},
"shareScript": false,
"platform": "Windows"
}
Add a new Linux shell script to the repository and share it
{
"description": "Cleanup temporary files on Linux endpoints",
"exitCodes": "0,1",
"arguments": "",
"scriptFile": {
"fileID": 67890
},
"shareScript": true,
"platform": "Linux"
}
Operation result. Always 'success' on successful script creation
Final filename of the script (may have suffix if duplicate was found)
Unique ID assigned to the newly created script
CONFIG_FORM_INPUT_MISSING: a required field is missing from the request
Message indicating which input field is missing
UAC_UNAUTHORIZED: user lacks the required role or access to all-customer scripts
Authentication or authorization failure reason
SW_INTERNAL_ERROR: insufficient storage to complete the operation
Message indicating the server storage is full
INTERNAL_ERROR: unexpected server error during processing
Message describing the internal server error
Script was added to the repository successfully
{
"fileName": "MyScript.bat",
"scriptId": 67890,
"status": "success"
}
File ID is missing from the request body
{
"errorMessage": "Some input field missing in configuration",
"errorCode": "CONFIG_FORM_INPUT_MISSING"
}
Non-admin user attempted to create an all-customer script
{
"errorMessage": "Access denied",
"errorCode": "UAC_UNAUTHORIZED"
}
Server does not have enough storage to add the script
{
"errorMessage": "Storage is full",
"errorCode": "SW_INTERNAL_ERROR"
}
Unexpected server error while adding the script
{
"errorMessage": "Internal Server Error",
"errorCode": "INTERNAL_ERROR"
}
![]()
Duration: 1 minute | Threshold: 30 | 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.
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.