title: Rest api design for an API which can consume three different type of json request
body: <p>I have a input field or you can assume its a question, for which the user interaction can be of 3 types.</p>
  <ol>
  <li>Text</li>
  <li>Selection (multichoice)</li>
  <li>Image upload (multiple medias)</li>
  </ol>
  <p>I want to understand what should be the standard way to accept these responses.</p>
  <p>I was thinking to have an API and request like below for Selection</p>
  <p><strong><a href="http://example.com/input/%7Bid%7D/response" rel="nofollow noreferrer">http://example.com/input/{id}/response</a></strong></p>
  <pre><code>Request Sample
  {
     &quot;selections&quot;: [id1, id2]
  }
  </code></pre>
  <p>for text type</p>
  <p><strong><a href="http://example.com/input/%7Bid%7D/response" rel="nofollow noreferrer">http://example.com/input/{id}/response</a></strong></p>
  <pre><code>Request Sample
  {
     &quot;inputValue&quot;: &quot;some input provided&quot;
  }
  </code></pre>
  <p>for media type</p>
  <p><strong><a href="http://example.com/input/%7Bid%7D/response" rel="nofollow noreferrer">http://example.com/input/{id}/response</a></strong></p>
  <pre><code>Request Sample
  {
     &quot;files&quot;: [
        {&quot;name&quot;:&quot;medianame&quot;, &quot;type&quot;:&quot;mediaType&quot;}
      ]
  }
  </code></pre>
  <p>But then if user wants to add a new file to the existing response, there need to be another API</p>
  <p><strong><a href="http://example.com/input/%7Bid%7D/response/%7BresponseId%7D/upload" rel="nofollow noreferrer">http://example.com/input/{id}/response/{responseId}/upload</a></strong></p>
  <p>This doesn't seem right and readable, what could be the possible best design solution ?</p>