diff --git a/alerta/database/backends/postgres/base.py b/alerta/database/backends/postgres/base.py
index <HASH>..<HASH> 100644
--- a/alerta/database/backends/postgres/base.py
+++ b/alerta/database/backends/postgres/base.py
@@ -839,6 +839,8 @@ class Backend(Database):
             UPDATE keys
             SET
         """
+        if 'user' in kwargs:
+            update += '"user"=%(user)s, '
         if 'scopes' in kwargs:
             update += 'scopes=%(scopes)s, '
         if 'text' in kwargs:
Add support for editing API key user (#<I>)