diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 8014bb3f92..64da3919db 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -1308,7 +1308,7 @@ App::get('/v1/messaging/messages/:id') ->inject('dbForProject') ->inject('response') ->action(function (string $id, Database $dbForProject, Response $response) { - $message = $dbForProject->getDocument('message', $id); + $message = $dbForProject->getDocument('messages', $id); if ($message->isEmpty()) { throw new Exception(Exception::MESSAGE_NOT_FOUND);