title: How to create a custom media type (application/vnd) for a RESTful web service?
body: <p>I'm playing with REST right now and thought I properly implement <a href="http://en.wikipedia.org/wiki/HATEOAS">HATEOAS</a> just to get all concepts right.</p>
  
  <p>For that I want to create my own media types (<code>application/vnd[...]+xml</code> and <code>application/vnd[...]+json</code>). </p>
  
  <p>One first question: <strong>Does the media type define the contract between my server and client?</strong></p>
  
  <p>The media type will define my message formats so I need to add XML schema and JSON schema to go with the new media types (so that REST clients know what's coming in messages and what to send back).</p>
  
  <p>I've done some research on the web but the details of how one does this are missing. Does it only involve writing exhaustive specification/documentations or are there some technical steps to implement? (I don't have to register it with IANA do I?)</p>
  
  <p><strong>How can a new - fully functional - <code>application/vnd</code> media type be created? and what do you need to take care of so that clients can properly use it?</strong></p>