Developer Experience is important, and that includes much more than the technical design of an API. It also includes the documentation and support as well as the pricing and the legal licensing terms. In almost every API project I have been involved in the legal details have been slapped on last-minute, usually by a lawyer that does not know anything about APIs or technology.
There are also way too many examples of API licensing terms that are actively developer hostile, which does not really invite developers to use the API (assuming they read the terms of service that is).
A customizable open source user agreement for APIs
The Swedish API License is an attempt to solve these problems. It is a free open source API license that is very flexible and can easily be adapted to different legal and business requirements. The legal details are according to Swedish law (since it is a Swedish project), but I think that most of the background work and the considerations behind the construction of the license are interesting for anyone working with APIs. The project was financed by VINNOVA (the Swedish Governmental Agency for Innovation Systems) and has taken almost a years work to develop, including collecting feedback via forums and workshops.
The project’s main goal was to make the lives of API publishers and developers using APIs easier by providing a somewhat standardised API License. To make this possible the API License has to be free and open for anyone to use and remix, which is why we in the end published the License and all related documents under Creative Commons. Our hope is that this will result in plenty of copycats and that the License can be used as is or as a start for lawyers to write a very customized License.
To begin with we thought that we could write one License to rule them all, but it quickly became clear that this would not be possible. There are so many different use cases that one License text impossibly could cover even the most common ones. So what we did was to identify the most important legal and commercial options and provide alternative paragraphs in the License depending on what choices are made. There are in total 13 options and 8192 possible combinations.
We also wanted the License to respect both the API publisher and the API consumer. Most API Licenses just favor the API publishers which we believe can have a very negative effect on the developer adoption of the API. Of course the API publisher can change the License however they want, but then at least developers can track the changes made since they have the original text of the Swedish API License.
Finally we wanted to have a short text that would be understandable for people without a law degree. Making it short is not possible in all countries as it depends on the local legislation, but in Sweden we are lucky to be able to write something shorter than a novel and still cover all legal aspects.
Commercial & Legal Options
The Commercial Options lets an API provider customize the API License depending on if the API is provided for pay, if commercial use of the API is allowed or not, how changes to the API are handled etc. The Legal Options for the Swedish API License focuses on Intellectual Property Rights and Personal Data Protection. If the API makes copyrighted, trademarked or personal data this impacts the developer that uses the API since they need to respect the laws protecting this kind of data.
The API License is not a document that lives in isolation, it is meant to be one document in the total package that is the Developer Experience. A few others that are needed (and referred to from the License) are of course technical documentation of the API, but also a policy to handle changes to the API and a policy describing how personal data is processed. These documents can be very different from case to case so for the moment we provide instructions and recommendations for these policies . Hopefully we can add more details and examples around these policies in the future.
Use the License!
If you are a Swede then just go ahead and get started with the license, otherwise there are still a lot of value in the Swedish API License. If you need an API License for your local legislation I recommend that you take a look at the summary of available options and the legal and commercial options for the Swedish API License. This summarizes what we have identified as the most important factors of an API License. If you want to make a version of the license for your country then feel free to contact us.
Of course you can also fork the License on GitHub!