diff --git src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index c313784..f19fa17 100644
--- src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
+++ src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
@@ -2002,14 +2002,12 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 			);
 		}
 
-		if ( 'page' === $this->post_type ) {
-			$schema['properties']['template'] = array(
-				'description' => __( 'The theme file to use to display the object.' ),
-				'type'        => 'string',
-				'enum'        => array_keys( wp_get_theme()->get_page_templates() ),
-				'context'     => array( 'view', 'edit' ),
-			);
-		}
+		$schema['properties']['template'] = array(
+			'description' => __( 'The theme file to use to display the object.' ),
+			'type'        => 'string',
+			'enum'        => array_keys( wp_get_theme()->get_page_templates( null, $this->post_type ) ),
+			'context'     => array( 'view', 'edit' ),
+		);
 
 		$taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
 		foreach ( $taxonomies as $taxonomy ) {
diff --git tests/phpunit/tests/rest-api/rest-posts-controller.php tests/phpunit/tests/rest-api/rest-posts-controller.php
index cdd5ec0..fab605b 100644
--- tests/phpunit/tests/rest-api/rest-posts-controller.php
+++ tests/phpunit/tests/rest-api/rest-posts-controller.php
@@ -56,6 +56,7 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
 	public function setUp() {
 		parent::setUp();
 		register_post_type( 'youseeme', array( 'supports' => array(), 'show_in_rest' => true ) );
+		add_filter( 'theme_post_templates', array( $this, 'filter_theme_post_templates' ) );
 	}
 
 	public function test_register_routes() {
@@ -1016,6 +1017,22 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
 		$this->check_create_post_response( $response );
 	}
 
+	public function test_create_item_with_template() {
+		wp_set_current_user( self::$editor_id );
+
+		$request = new WP_REST_Request( 'POST', '/wp/v2/posts' );
+		$params = $this->set_post_data( array(
+			'template' => 'post-my-test-template.php',
+		) );
+		$request->set_body_params( $params );
+		$response = $this->server->dispatch( $request );
+
+		$data = $response->get_data();
+		$new_post = get_post( $data['id'] );
+		$this->assertEquals( 'post-my-test-template.php', $data['template'] );
+		$this->assertEquals( 'post-my-test-template.php', get_page_template_slug( $new_post->ID ) );
+	}
+
 	public function test_rest_create_item() {
 		wp_set_current_user( self::$editor_id );
 
@@ -2224,6 +2241,7 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
 		if ( isset( $this->attachment_id ) ) {
 			$this->remove_added_uploads();
 		}
+		remove_filter( 'theme_post_templates', array( $this, 'filter_theme_post_templates' ) );
 		parent::tearDown();
 	}
 
@@ -2238,4 +2256,11 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
 		return $query;
 	}
 
+	public function filter_theme_post_templates( $post_templates ) {
+		return array(
+			'post-my-test-template.php' => 'My Test Template',
+		);
+
+		return $post_templates;
+	}
 }
