API Documentation: Where to Begin
braintreepayments.com
braintreepayments.com
It's important to actually watch people use your documentation, to see how effective it is. The OP linked to our HowTo section as a good example of focusing on use cases. In user tests the HowTo sections are one of the least effective sections of our documentation. Most of the howtos are only available in PHP or C#, and the way they are written now makes it difficult to translate that code into the language the user would rather use. They also put more focus on working code samples than on explaining the concepts - people really struggle with understanding what happens when they get a call or a text at their Twilio number. We're working on revamping our documentation to help make this stuff more clear.
So I'd be wary - the concept of code samples is good, but the devil is clearly in the details.
Check it out: http://docmaps.io/
As an aside, we use Swagger internally to manage and self-document here, and then I/O Docs on the third-party developer side. It's a nice separation of concerns.
It's also open source, which makes developer me happy. The only thing I wish they would update is allowing JSON to be sent in the request body, which there seems to be an open pull request for on GitHub:
I'd like to add a where not to begin: putting a big Woah, Nerds Only! warning at the top of your API docs (I'm looking at you, Mailchimp[0]).
Example: http://mashape.com/lambda/face