diff --git a/src/ApiRoute.php b/src/ApiRoute.php
index <HASH>..<HASH> 100644
--- a/src/ApiRoute.php
+++ b/src/ApiRoute.php
@@ -386,7 +386,7 @@ class ApiRoute extends ApiRouteSpec implements Router
 
 		foreach ($parameters as $name => $value) {
 			if (strpos($path, "<{$name}>") !== false && $value !== null) {
-				$path = str_replace("<{$name}>", $value, $path);
+				$path = str_replace("<{$name}>", (string) $value, $path);
 
 				unset($parameters[$name]);
 			}
Fix for str_replace(): Argument #2 () must be of type array|string, int given