References
The GitHub API, with its extensive documentation, is a good place to explore how a rich API is constructed. It has a Getting Started section that is worth reading:
https://developer.github.com/guides/getting-started/
Of course, this is not specific to Scala: it uses cURL to query the API.
Read the documentation (http://json4s.org) and source code (https://github.com/json4s/json4s) for json4s
for a complete reference. There are many parts of this package that we have not explored, in particular, how to build JSON from Scala.