If a course is "Invitation Only" can I still enroll users via API?

We have an app that enrolls folks in edX, by making a POST to /api/enrollment/v1/enrollment

We’d like to use it with course that are “Invitation Only.” Is that possible? If we make the enrollment POST with a particular user – maybe an instructor in the course, or a django staff – will it work?

Thanks for any advice,
Peter Pinch
MIT Open Learning