diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
index 51c1ac29b8294..7b9f176c5bd07 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
@@ -88,7 +88,7 @@ public function register_routes() {
 		// Lists/updates a single global style variation based on the given id.
 		register_rest_route(
 			$this->namespace,
-			'/' . $this->rest_base . '/(?P<id>[\/\w-]+)',
+			'/' . $this->rest_base . '/(?P<id>[\/\d+]+)',
 			array(
 				array(
 					'methods'             => WP_REST_Server::READABLE,
@@ -96,9 +96,8 @@ public function register_routes() {
 					'permission_callback' => array( $this, 'get_item_permissions_check' ),
 					'args'                => array(
 						'id' => array(
-							'description'       => __( 'The id of a template' ),
-							'type'              => 'string',
-							'sanitize_callback' => array( $this, '_sanitize_global_styles_callback' ),
+							'description' => __( 'ID of global styles config.' ),
+							'type'        => 'integer',
 						),
 					),
 				),
@@ -464,7 +463,7 @@ public function get_item_schema() {
 			'properties' => array(
 				'id'       => array(
 					'description' => __( 'ID of global styles config.' ),
-					'type'        => 'string',
+					'type'        => 'integer',
 					'context'     => array( 'embed', 'view', 'edit' ),
 					'readonly'    => true,
 				),
diff --git a/tests/phpunit/tests/rest-api/rest-global-styles-controller.php b/tests/phpunit/tests/rest-api/rest-global-styles-controller.php
index b55c7c3d606eb..59986e597c71b 100644
--- a/tests/phpunit/tests/rest-api/rest-global-styles-controller.php
+++ b/tests/phpunit/tests/rest-api/rest-global-styles-controller.php
@@ -133,13 +133,13 @@ public function filter_theme_file_uri( $file ) {
 	public function test_register_routes() {
 		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey(
-			'/wp/v2/global-styles/(?P<id>[\/\w-]+)',
+			'/wp/v2/global-styles/(?P<id>[\/\d+]+)',
 			$routes,
 			'Single global style based on the given ID route does not exist'
 		);
 		$this->assertCount(
 			2,
-			$routes['/wp/v2/global-styles/(?P<id>[\/\w-]+)'],
+			$routes['/wp/v2/global-styles/(?P<id>[\/\d+]+)'],
 			'Single global style based on the given ID route does not have exactly two elements'
 		);
 		$this->assertArrayHasKey(
@@ -408,7 +408,7 @@ public function data_get_theme_item_invalid_theme_dirname() {
 			// Themes deep in subdirectories.
 			'2 subdirectories deep'  => array(
 				'theme_dirname' => 'subdir/subsubdir/mytheme',
-				'expected'      => 'rest_global_styles_not_found',
+				'expected'      => 'rest_no_route',
 			),
 		);
 	}
@@ -776,4 +776,54 @@ public function test_assign_edit_css_action_admin() {
 			$this->assertArrayHasKey( 'https://api.w.org/action-edit-css', $links );
 		}
 	}
+
+	/**
+	 * Test that the route accepts integer IDs.
+	 *
+	 * @ticket 61911
+	 */
+	public function test_global_styles_route_accepts_integer_id() {
+		wp_set_current_user( self::$admin_id );
+		$request  = new WP_REST_Request( 'GET', '/wp/v2/global-styles/' . self::$global_styles_id );
+		$response = rest_get_server()->dispatch( $request );
+
+		$this->assertEquals( 200, $response->get_status() );
+
+		$data = $response->get_data();
+		$this->assertIsInt( $data['id'] );
+		$this->assertSame( self::$global_styles_id, $data['id'] );
+	}
+
+	/**
+	 * Test that the schema defines ID as an integer.
+	 *
+	 * @ticket 61911
+	 */
+	public function test_global_styles_schema_id_type() {
+		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/global-styles/' . self::$global_styles_id );
+		$response = rest_get_server()->dispatch( $request );
+
+		$data   = $response->get_data();
+		$schema = $data['schema'];
+
+		$this->assertArrayHasKey( 'properties', $schema );
+		$this->assertArrayHasKey( 'id', $schema['properties'] );
+		$this->assertArrayHasKey( 'type', $schema['properties']['id'] );
+		$this->assertSame( 'integer', $schema['properties']['id']['type'] );
+	}
+
+	/**
+	 * Test that the route argument schema defines ID as an integer.
+	 *
+	 * @ticket 61911
+	 */
+	public function test_global_styles_route_args_schema() {
+		$routes     = rest_get_server()->get_routes();
+		$route_data = $routes['/wp/v2/global-styles/(?P<id>[\/\d+]+)'];
+
+		$this->assertArrayHasKey( 'args', $route_data[0] );
+		$this->assertArrayHasKey( 'id', $route_data[0]['args'] );
+		$this->assertArrayHasKey( 'type', $route_data[0]['args']['id'] );
+		$this->assertSame( 'integer', $route_data[0]['args']['id']['type'] );
+	}
 }
diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php
index 03dcb0631f133..7f8de5f0dd83d 100644
--- a/tests/phpunit/tests/rest-api/rest-schema-setup.php
+++ b/tests/phpunit/tests/rest-api/rest-schema-setup.php
@@ -133,7 +133,7 @@ public function test_expected_routes_in_schema() {
 			'/wp/v2/users/(?P<user_id>(?:[\\d]+|me))/application-passwords/(?P<uuid>[\\w\\-]+)',
 			'/wp/v2/comments',
 			'/wp/v2/comments/(?P<id>[\\d]+)',
-			'/wp/v2/global-styles/(?P<id>[\/\w-]+)',
+			'/wp/v2/global-styles/(?P<id>[\/\d+]+)',
 			'/wp/v2/global-styles/(?P<parent>[\d]+)/revisions',
 			'/wp/v2/global-styles/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)',
 			'/wp/v2/global-styles/themes/(?P<stylesheet>[\/\s%\w\.\(\)\[\]\@_\-]+)/variations',
diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js
index f87397b20a449..268f03c3b71fd 100644
--- a/tests/qunit/fixtures/wp-api-generated.js
+++ b/tests/qunit/fixtures/wp-api-generated.js
@@ -6896,7 +6896,7 @@ mockedApiResponse.Schema = {
                 }
             ]
         },
-        "/wp/v2/global-styles/(?P<id>[\\/\\w-]+)": {
+        "/wp/v2/global-styles/(?P<id>[\\/\\d+]+)": {
             "namespace": "wp/v2",
             "methods": [
                 "GET",
@@ -6914,8 +6914,8 @@ mockedApiResponse.Schema = {
                     },
                     "args": {
                         "id": {
-                            "description": "The id of a template",
-                            "type": "string",
+                            "description": "ID of global styles config.",
+                            "type": "integer",
                             "required": false
                         }
                     }