code: def post(self, request, *args, **kwargs):
          
          serializer = EventSerializer(data=request.data)
  
          if not serializer.is_valid():
              return Response(
                  {"accepted": False, "reason": serializer.errors}, status=400
              )
  
          data = serializer.validated_data
  
          event_type = {
              "ack": "ack",
              "nack": "nack",
              "delivery_report": "delivery_succeeded",
          }.get(data["event_type"])
  
          accepted, reason = process_event(
              data["user_message_id"], event_type, data["nack_reason"], data["timestamp"]
          )
  
          return Response(
              {"accepted": accepted, "reason": reason}, status=200 if accepted else 400
          )
docs: Checks for expect event types before continuing