Be sure to check the API documentation in your own Moodle site for the full list of API available.
It is found under
So for example when creating the course you can set all the course options as below.
//courses to create
list of (
fullname string //full name
shortname string //course short name
categoryid int //category id
idnumber string Optional //id number
summary string Optional //summary
summaryformat int Default to "1" //summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN)
format string Default to "topics" //course format: weeks, topics, social, site,..
showgrades int Default to "1" //1 if grades are shown, otherwise 0
newsitems int Default to "5" //number of recent items appearing on the course page
startdate int Optional //timestamp when the course start
enddate int Optional //timestamp when the course end
numsections int Optional //(deprecated, use courseformatoptions) number of weeks/topics
maxbytes int Default to "0" //largest size of file that can be uploaded into the course
showreports int Default to "0" //are activity report shown (yes = 1, no =0)
visible int Optional //1: available to student, 0:not available
hiddensections int Optional //(deprecated, use courseformatoptions) How the hidden sections in the course are displayed to students
groupmode int Default to "0" //no group, separate, visible
groupmodeforce int Default to "0" //1: yes, 0: no
defaultgroupingid int Default to "0" //default grouping id
enablecompletion int Optional //Enabled, control via completion and activity settings. Disabled,
not shown in activity settings.
completionnotify int Optional //1: yes 0: no
lang string Optional //forced course language
forcetheme string Optional //name of the force theme
courseformatoptions Optional //additional options for particular course format
list of (
name string //course format option name
value string //course format option value
However the is not a add_module that I can see, at least.