I’m working on a small tool for automagically creating merge requests and I can’t seem to find any option in the API for setting the draft attribute either when creating or updating a merge request. Have I just missed it (entirely possible).
I guess you already figured it out in the meantime.
When creating a draft merge request, you need to prepend the title of the merge request with Draft: or WIP: (Work In Progress). GitLab treats merge requests with titles that start with Draft: or WIP: as draft merge requests.