title: Rest API Design Establishing Connection between the same resource
body: <p>I have a resource called clients.  We are now creating a system where we can link clients with other clients to create subclients.  We are creating a table to represent this called clientconnections, which contains clientId and subclientId.</p>
  
  <p>Now to establish this, we are doing it via an invite system (so we'll need an invite action api).</p>
  
  <p>What is the best way to represent this in a restful way?</p>
  
  <p><code>GET/PUT/POST</code> can be through a simple API such as:
  <code>/clients/{clientId}/connections</code></p>
  
  <p>But establishing the connection via a rest API is hard. Here is my original idea... but i definitely think it's wrong.</p>
  
  <p><code>POST
  /clients/{clientid}/connections/{clientid2 doh}/invite</code></p>
  
  <p>or this but this doesn't seem right either</p>
  
  <p><code>POST
  /clients/{clientid}/clients/{clientid2}/invite</code></p>
  
  <p>Any suggestions would be great!</p>
  
  <p>Thanks!</p>