I have an SSJS code script that can create a File Transfer Activity but by default, it's made File Action is "Manage File" so how can I change it to "Move a File From Safehouse". Here is my code:
Thank in advance!
function execute_Create_FileTransfer(accessToken) {
var restEndpoint = 'https://xxxx.rest.marketingcloudapis.com';
var url = restEndpoint + 'automation/v1/filetransfers';
var payload = {
Name: 'xxxxx',
CustomerKey: 'xxxxx',
FileTransferLocationId: "yyyy",
Description: "FileTransferTest",
FileSpec: 'testing.csv'
}
var req = new Script.Util.HttpRequest(url);
req.emptyContentHandling = 0;
req.retries = 2;
req.continueOnError = true;
req.contentType = "application/json";
req.setHeader("Authorization", "Bearer " + accessToken);
req.method = "POST";
req.postData = Stringify(payload);
var resp = req.send();
}