I have found after many trys,
When using internal api with PHP dont use a json but an array.
Like that:
$newRow = array('resource' => array(
"create_uid" => 1,
"description" => "something",
"res_model" => "res.partner",
"type" => "binary",
"datas_fname" => $fileName,
"res_name" => " ",
"file_size" => strlen($event['request']['content']),
"name" => "test",
"company_id" => 1,
"write_uid" => 1,
"store_fname" => $subPath."/".$fileNameOnStore
)
);$result2 = $platform['api']->post-> _invoke('odoocloneprod/table/ir_attachment',$newRow);