When creating a page (or space), can REST API access 'insert -> markup' option?

I have over 1,600 pages to upload, and all these pages-to-be have Confluence markup. I’ve noticed copy/pasting Confluence markup does not work properly, but inserting markup and THEN pasting in Confluence markup content does.

I am trying to do this automatically via API. I’ve noticed page and space creation includes a title and description, but is there a way to properly include markup so that the content displays properly?