The documentation for Firestore batch writes lists only set(), update() and delete() as permitted operations.
set()
update()
delete()
Is there no way
For PHP you can try :
$batch = $db->batch(); $newCityRef = $db->collection('cities')->newDocument(); $batch->set($newCityRef , [ 'name'=>'New York City' ]);