You can do it with the SonicOS-API. Check the below KB. Even when is for creating Address Object, it would be the same process with a different JSON Object
https://www.sonicwall.com/support/knowledge-base/adding-multiple-address-objects-using-sonicos-api/200524131217347/
{
"dhcp_server": {
"ipv4": {
"scope": {
"static": [
{
"ip": "string",
"mac": "string",
"enable": true,
"name": "string",
"lease_time": 0,
"default_gateway": "string",
"netmask": "string",
"comment": "string",
"domain_name": "string",
"dns": {
"server": {}
},
"wins": {
"primary": "string",
"secondary": "string"
},
"call_manager": {
"primary": "string",
"secondary": "string",
"tertiary": "string"
},
"network_boot": {
"next_server": "string",
"boot_file": "string",
"server_name": "string"
},
"generic_option": {},
"always_send_option": true
}
]
}
}
}
}