title: Should I use UUIDs for resources in my public API?
body: <p>I'm building a SaaS application and want to expose IDs for resources which are not tied to my current data storage implementation (Postgres auto-increment IDs). These Stack Overflow posts (<a href="https://stackoverflow.com/questions/6215639/use-of-guids-as-id-in-public-facing-data-integration-web-service">one</a> <a href="https://stackoverflow.com/questions/3613120/what-is-the-preferred-method-for-generating-locally-unique-identifiers-in-vb-net">two</a>) suggest that creating locally unique IDs is hard and that I might as well use UUIDs, which are of course easily and safely generated in pretty much any language.</p>
  
  <p>I'm happy with this approach, but I wonder why I can't find any APIs from big SaaS/hosted players which do the same? For example:</p>
  
  <ul>
  <li>Shopify: <a href="http://api.shopify.com/transactions.html" rel="noreferrer">9 digit numbers</a></li>
  <li>Twilio: <a href="http://www.twilio.com/docs/api/rest/call" rel="noreferrer">34 character strings</a></li>
  <li>Twitter: <a href="https://dev.twitter.com/docs/api/1/get/statuses/retweets/:id" rel="noreferrer">20+ digit numbers</a></li>
  <li>AMEE: <a href="http://www.amee.com/developer/docs/apc.php#uid_reference" rel="noreferrer">12 character A-Z0-9</a></li>
  </ul>
  
  <p>So basically nobody seems to use UUIDs. Is there a reason for this - not-invented-here, cleverer internal ID algorithms or something else? And in my case, in the absence of any internal algorithm, does it make most sense to go with UUIDs?</p>