At Apiary, we encourage a contract-first approach to designing your API. Write your API Description first before writing any server or client code.

To make this process possible, Apiary provides tools that allow you to try out your API as you design it. Code examples are one tool provided that can be dropped into your existing code or used for prototyping.

Finding and Using Code Examples

You can find the code examples in the machine column of the documentation. Below is a screenshot of the JavaScript code example you would see in the Polls API documentation.

JavaScript Code Example

Contributing Code Examples

Our code examples are open source, and you can contribute by improving our existing examples or adding new ones. You can find these examples templates in this GitHub repository.

Was this page useful?
Thank you for the feedback!
What went wrong?