code: def post(self, receiver_id=None):
          
          try:
              user_id = request.oauth.access_token.user_id
          except AttributeError:
              user_id = current_user.get_id()
  
          event = Event.create(
              receiver_id=receiver_id,
              user_id=user_id
          )
          db.session.add(event)
          db.session.commit()
  
          # db.session.begin(subtransactions=True)
          event.process()
          db.session.commit()
          return make_response(event)
docs: Handle POST request.