Each custom directory (ending with /) you add under the directory
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/
(which is a directory ending with /) needs to have its path added as a value entry to the key
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings
(which is a key with the same name as the above mentioned directory but not ending with /)
... and you can read its current values with
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings
So, in addition to creating the custom directory and populating it with keys and values like this (using dconf):
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/binding "'<Super>c'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/command "'gnome-calculator'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/name "'Launch Calculator'"
... which you can verify with dconf dump like this:
$ dconf dump /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/
[/]
binding='<Super>c'
command='gnome-calculator'
name='Launch Calculator'
... You will need to add its path to the /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings key while preserving the pre-existing values in that key's array ['...', '...', ...] like this:
if [ -z "$(dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings | tr -d '][')" ]; then
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/']"
else
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings "[$(dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings | tr -d '][') , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/']"
fi
... which you can verify with dconf read like this:
$ dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings
['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom999/']
Notice I used the dconf tool as it's available by default on all Ubuntu installs and thus offers out-of-the-box support especially for widely deployed scripts, but you can install the gsettings front-end tool and use it modifying the above commands' syntax and directory/key paths style to work with it ... See man gsettings and look at the output of gsettings list-schemas and gsettings list-recursively before using it.