title: Should a RESTful API return 400 or 404 when passed an invalid id
body: <p>When building a RESTful API and a user provides an <strong>id</strong> of resource that does not exist, should you return <code>404 Not Found</code> or <code>400 Bad Request</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>https://api.domain.com/v1/resource/foobar
  </code></pre>
  
  <p>Where <strong>foobar</strong> does not exist.</p>