Combining both and after some tests, this is the correct format :
var name = "NewTestStyle3";
try{
Resources["EntityServices"].CreateStyleDefinition({
name: name,
description: undefined ,
content: { "content" :
{ "params": "",
"image":"",
"backgroundColor":"#d49d13",
"textSize":"normal",
"lineStyle":"dotted",
"displayString":"Series 15",
"fontEmphasisUnderline":false,
"fontEmphasisItalic":false,
"lineThickness":1,
"lineColor":"#ffac20",
"foregroundColor":"#ffdc84",
"fontEmphasisBold":false,
"secondaryBackgroundColor":"#ffb22f"
}
},
tags: undefined
});
}catch(err) {
logger.error("EERROR STYLE CREATION "+err);
Resources["EntityServices"].DeleteStyleDefinition({
name: name
});
}