Add Field to Custom Content Type Programatically
My suggestion is to use the Core Configuration Manager to "automatically" generate all the options you need. See https://www.drupal.org/docs/8/configuration-management/managing-your-sites-configuration

The approach I'd use would be to create the new content types and all their fields through the UI. Then go to Configuration -> Development -> Configuration synchronization -> Export (tab) -> Single item

From there, you just need to select your various pieces of content one-by-one. For example, if you select "Content type" from the Configuration type menu and then Article (or your custom content type), you'll see the configuration you'd put in the .yml file in your custom module config/install folder. Just eliminate that first uuid: line. If you scroll down past the configuration text area, you'll see the name of the file name you need. For article, it's "node.type.article.yml"

Besides the content types, you'll also need the Field and Field storage configuration types (and probably Entity form display and Entity view display). Pay attention to the config dependencies to make sure you get all the pieces of configuration you need.

Once you get everything you need into configuration files, you can delete everything you created through the UI, install (or reinstall) your custom module and then check whether everything is as you want it. If it's not, you can make changes through the UI and export the config again to fix your custom module configuration yaml files. Or you can just edit the files directly once you see how everything is organized, especially if you're just making little changes like the label or description text for a field.

For me, this approach was much less painful than "scouring through the API", trying to find all the various keys and possible values.