diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index a6c9a63..863fcbe 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -106,19 +106,26 @@
 
         return patterns
 
+    def list(self, request):
+        object_list = self.filter_queryset(self.get_queryset())
+
+        serializer = self.get_serializer(object_list, many=True)
+
+        return Response({"subscribers": serializer.data})
+
     def get_url_filtering(self, request, pk=None):
         subscriber = self.get_object()
-        return Response(subscriber.url_filter_level)
+        return Response({"level": subscriber.url_filter_level})
 
     def set_url_filtering(self, request, pk=None, level=None):
         subscriber = self.get_object()
         subscriber.url_filter_level = level
         subscriber.save()
-        return Response(subscriber.url_filter_level)
+        return Response({"level": subscriber.url_filter_level})
 
     def get_users(self, request, pk=None):
         subscriber = self.get_object()
-        return Response(subscriber.users)
+        return Response({"users": subscriber.users})
 
     def get_services(self, request, pk=None):
         subscriber = self.get_object()
@@ -127,21 +134,21 @@
     def get_service(self, request, pk=None, service=None):
         service_attr = service+"_enable"
         subscriber = self.get_object()
-        return Response(getattr(subscriber, service_attr))
+        return Response({service: getattr(subscriber, service_attr)})
 
     def enable_service(self, request, pk=None, service=None):
         service_attr = service+"_enable"
         subscriber = self.get_object()
         setattr(subscriber, service_attr, True)
         subscriber.save()
-        return Response(getattr(subscriber, service_attr))
+        return Response({service: getattr(subscriber, service_attr)})
 
     def disable_service(self, request, pk=None, service=None):
         service_attr = service+"_enable"
         subscriber = self.get_object()
         setattr(subscriber, service_attr, False)
         subscriber.save()
-        return Response(getattr(subscriber, service_attr))
+        return Response({service: getattr(subscriber, service_attr)})
 
 
 
