diff --git a/posthog/api/authentication.py b/posthog/api/authentication.py index 9b7dc954a97fa..10538c1d77ceb 100644 --- a/posthog/api/authentication.py +++ b/posthog/api/authentication.py @@ -179,6 +179,10 @@ def create(self, request: Request, *args: Any, **kwargs: Any) -> Response: """ response = super().create(request, *args, **kwargs) response.status_code = getattr(self, "SUCCESS_STATUS_CODE", status.HTTP_200_OK) + + if response.status_code == status.HTTP_204_NO_CONTENT: + response.data = None + return response