Is it possible to store posts in pure markdown format? so that I can retrieve the content through the REST API and get the markdown code, without any added html?
You can try
remove_filter( 'the_content', 'wpautop' ); to remove the added HTML tags.
You have to do two things
- Completely disable visual editor
- enable Markdown.
Disable Visual editor: Add this code in the themes function.php file or as a plugin.
add_filter( 'user_can_richedit' , '__return_false', 50 );
Enable Markdown: Install this plugin Wp-Markdown