diff --git a/src/bp-core/bp-core-rest-api.php b/src/bp-core/bp-core-rest-api.php
index 40771ef34..0d0fbfa7a 100644
--- a/src/bp-core/bp-core-rest-api.php
+++ b/src/bp-core/bp-core-rest-api.php
@@ -138,6 +138,7 @@ function bp_rest_version() {
  * Get user URL.
  *
  * @since 5.0.0
+ * @deprecated 9.0.0 Use `bp_rest_get_object_url` instead.
  *
  * @param  int $user_id User ID.
  * @return string
@@ -151,6 +152,27 @@ function bp_rest_get_user_url( $user_id ) {
 	);
 }
 
+/**
+ * Get a REST API object URL from a component.
+ *
+ * @since 9.0.0
+ *
+ * @param integer $object_id   Object ID.
+ * @param string  $object_path Path of the component endpoint.
+ * @return string
+ */
+function bp_rest_get_object_url( $object_id, $object_path ) {
+	return rest_url(
+		sprintf(
+			'/%1$s/%2$s/%3$s/%4$d',
+			bp_rest_namespace(),
+			bp_rest_version(),
+			$object_path,
+			$object_id
+		)
+	);
+}
+
 /**
  * Set headers to let the Client Script be aware of the pagination.
  *
