input: Write a function to create a Flask API that takes a list of integers and returns their minimum and maximum values. The API should have a route "/minmax" that accepts POST requests. If the list is provided, return a dictionary with keys 'min' and 'max' containing the minimum and maximum values respectively.
  
  assert minmax_api('[12, 4, 9, 24, -5]') == {'min': -5, 'max': 24}
  assert minmax_api('[42, 0, -1, 15, 30]') == {'min': -1, 'max': 42}
  assert minmax_api('[]') == None
  assert minmax_api('[7]') == {'min': 7, 'max': 7}
  assert minmax_api('[2, 2, 2, 2]') == {'min': 2, 'max': 2}
output: 
  @app.route('/minmax', methods=['POST'])
  def minmax_api():
      data = request.get_json()
      if not data or not isinstance(data, list) or len(data) == 0:
          return None
      return {'min': min(data), 'max': max(data)}
  