Adding the below block resolved the issue.
@csrf_exempt # This decorator exempts CSRF protection for the POST request def post(self, request, *args, **kwargs): return super().post(request, *args, **kwargs)