Recent blog posts

Archives

202620252024202320222021202020192018201720162015201420132012201120102009200820072006Browse posts by year

Browse by tag

Browse posts by tag

Search tomjoht.github.io with DeepWiki

tomjoht.github.io is indexed by DeepWiki.

Other tech writing blogs

See the tech writing blog webring: Previous | Next | Random

${highlightedContent}
`; } } }) ); search.start(); });

Search results

Documenting APIs: A guide for technical writers and engineers

Course overview 25% complete
  1. Overview
  2. Course introduction
  3. Why I developed this course
  4. About the author
  5. Download PDFs
  6. Workshop video recordings
  7. Workshop agenda, slides, activities
  8. What's new

Topic 2 of 8

Last updated: Jan 07, 2025

In this course on writing documentation for APIs, instead of just talking about abstract concepts, I contextualize APIs with a direct, hands-on approach. You’ll first learn about API documentation by using a simple weather API to put a weather forecast on your site.

As you use the API, you’ll learn about endpoints, parameters, data types, authentication, curl, JSON, the command line, Chrome’s Developer Console, JavaScript, and more. The idea is that rather than learning about these concepts independent of any context, you learn them by immersing yourself in a real scenario while using an API. Immersion in real scenarios makes these tools and technologies more meaningful.

We’ll then transition into standards, tools, and specifications for REST APIs. You’ll learn about the required sections in API documentation, analyze examples of REST API documentation from various companies, learn how to join an open-source project to get experience, and more.

About REST APIs

In a nutshell, REST APIs (which are a type of web API) involve requests and responses, not too unlike visiting a web page. You make a request to a resource stored on a server, and the server responds with the requested information. The protocol used to transport the data is HTTP. “REST” stands for Representational State Transfer.

Response and request model for REST APIs
REST APIs involve requests and responses over HTTP protocol

I dive more into the principles of REST in What is a REST API? In REST API documentation, you describe the various endpoints available, their methods, parameters, and other details, and you also document sample responses from the endpoints.

From practice to documentation

In this course, after you practice using an API like a developer, you’ll then shift perspectives and “become a technical writer” tasked with documenting a new endpoint that engineers added to an API. As a technical writer, you’ll tackle each element of a reference topic in REST API documentation:

  1. Resource descriptions
  2. Endpoints and methods
  3. Parameters
  4. Request example
  5. Response example

Exploring each of these sections will give you a solid understanding of how to document REST APIs. You’ll also learn how to document the conceptual sections for an API, such as the getting started tutorial, product overview, status and error codes, request authorization, and more.

You’ll also dive into different ways to publish REST API documentation, exploring tools and specifications such as GitHub, static site generators like Jekyll, and other docs-as-code approaches. You’ll learn how to leverage templates, build interactive API consoles so users can try out requests and see responses, and learn how to manage your content through version control.

We’ll also dive into specifications such as the OpenAPI specification and Swagger UI (which provides tooling for the OpenAPI specification). Additionally, you’ll learn how to document native library APIs and generate Javadoc.

Tech writing is about more than tools and technology, though. As such, I even explore processes and methodologies in depth, explaining how to manage both large and small documentation projects, how to collect documentation feedback, how to keep stakeholders happy and updated, and more.

I’ve also included a section on metrics and measurement, which lists a comprehensive quality checklist. The criteria described can help you evaluate your own developer portal in myriad ways against industry best practices.

Throughout this course, I put these concepts in real, applicable contexts with hands-on activities and demos.

Who the course is for

The course primarily serves the following audiences:

Course organization

The course consists of the following sections:

You can download a PDF of this course here. The download includes a comprehensive PDF of the entire course (900+ pages) as well as individual chapter PDFs, which are more practical for printing. The chapter PDFs are all under 10MB, which means you can also upload them into Claude.ai or other AI tools with large input allowances and interact with the information that way.

Sequence and activities

You don’t have to read the sections in order — feel free to skip around as you prefer. Some of the earlier sections (such as the section on Using a REST API like a developer and Documenting endpoints) follow a somewhat sequential order with the same weather API scenario, but by and large you can jump around as desired.

Because the purpose of the course is to help you learn, there are many activities that require hands-on coding and other exercises. Along with the learning activities, there are also conceptual deep dives, but the focus is always on learning by doing. Where there are hands-on activities, I typically include this icon in the section title: . Other topics have the word “Activity” in the title. The activities are integrated into various sections, but you can also see many of the activities in the Workshop Activities. These are the activities we do during live workshops.

' // 3di contents[1] = '
3di - Clear technical documentation, complex translation, and content operations
' //Document360 contents[2] = '
Manage API docs and software docs all in one place
' // Ads must render at their promised 250x150. The content column is // ~823px, so three 250px ads only fit above 1200px (col-xl-4); // between 992-1199px they go two per row (col-lg-6) and stack below. var i = 0 //variable used to contain controlled random number var random //while all of array elements haven't been cycled thru while (i

I refer to the content here as a “course” instead of a book or a website, primarily because I include a lot of exercises throughout in each section, and I find that people who want to learn API documentation prefer a more hands-on “course” experience. Below each topic is a progress indicator that reminds you to keep moving through the course.

How long will it take to finish the course?

Don’t be daunted if you never make it entirely through the course. If printed to PDF, the content is about 900 pages. And I keep adding to the content, refining it, rearranging and adjusting it as I see fit and as I grow my experience and awareness. It’s a living document. Almost no one really finishes the course from beginning to end because by the time they do, I’ll have added new content.

Also, you should only focus on those sections that you need to learn. See this Reddit post, Has anyone here completed the idratherbewriting API writing course by Tom Johnson?. For someone already familiar with many concepts, they can breeze through the course in less than a week. For someone new to API documentation, they might spend many months making their way through the course. If you keep finding value in the content, take as long as you want. If you don’t find yourself learning anything, skip forward.

Will this course help you get a job in API documentation?

The most common reason people take this course is to transition into API documentation. This course will help you make that transition, but you can’t just passively read through the content. You need to do the activities outlined in each section, especially those topics that involve working with content from an open-source project (or something similar). These activities are crucial to building experience and credibility with a portfolio. I provide more details in Getting an API documentation job and thriving. Without a strong portfolio to demonstrate your writing expertise, almost no manager will hire you, even if you have an extensive tech background.

No programming skills required

As for the needed technical background for the course, you don’t need any programming background or other prerequisites, but it will help to know some basic HTML, CSS, and JavaScript.

If you do have some familiarity with programming concepts, you might speed through some of the sections and jump ahead to the topics you want to learn more about. This course assumes you’re a beginner, though.

Some of the code samples in this course use JavaScript. JavaScript may or may not be a language that you actually use when you document REST APIs, but most likely there will be some programming language or platform that becomes important to know.

JavaScript is one of the most useful and easy languages to become familiar with, so it works well in code samples for this introduction to REST API documentation. JavaScript allows you to test code by merely opening it in your browser (rather than compiling it in an IDE). (I have a quick crash-course in JavaScript here if you need it.)

What you’ll need

Here are a few tools you’ll need to do the activities in this course:

Modern Tools Note: While this course focuses on fundamental concepts, you may also encounter modern tools like GitHub Copilot, VS Code extensions, and AI-powered documentation tools. These can enhance your workflow but aren’t required for the core learning objectives.

Testing Your Setup

In the past, people have asked for some tests to check whether their laptops are correctly set up.

Video recordings

For video recordings of this course, see the Video recordings of API doc workshops. The page lists the most recent video recordings available. The video doesn’t go into the same level of detail as the written material, but it would be a good start.

See my Upcoming Presentations on my blog for details about future workshops and presentations.

Course slides

For the live workshops, I have various slides that cover different sections of this course. See Course Slides for the links. The slides use RevealJS, which is an HTML/CSS/JS framework for slides. The images are single-sourced between the site and the slides, so they’ll more likely stay in sync.

Some people have asked whether they can use materials from this course to give their own API documentation workshops. I only allow the material to be used for non-profit workshops where the workshop leader isn’t charging participants for the instruction. Of course, many of the ideas and concepts in this course aren’t specific or unique to me, and you’re entitled to fair use. However, please don’t just hijack my site’s materials, activities, and other information for your own commercial endeavors.

If you’re a teacher at a college or university (or high school) and are trying to teach APIs and developer docs to your students, feel free to use this site as part of your instructional materials. I appreciate links back to the site and attribution as needed (links pointing to my site boost search engine rankings). My larger goal for this site is to help educate and empower tech writers with developer documentation strategies, workflows, and best practices. If you’d like to share your API documentation course syllabus, contact me and I’ll add a link here.

Is this course really free?

Yes, this course is entirely free. I only charge for the PDF. Advertising also helps make this content free, so you will see little text snippets and other ads on the course pages promoting links to API service providers. Sometimes I also include sponsored pages as well to highlight a vendor’s particular offerings. Whenever content is sponsored, I note that on the page. I also wouldn’t include any content in the course that didn’t meet my standards or which I wouldn’t recommend.

If you’d like to give back, feel free to support me by buying the PDF of the course. I’m grateful to see many people who find enough value in the course to contribute back.

PDF format

To read the same content in PDF format, see Download PDFs. You can print out the section you want, or load it into a PDF reader to highlight/annotate content. You can also upload chapters into your favorite AI tool and interface with the content that way.

Let me know if any content is out of date

One of the challenges in any technical course is ensuring the content stays up to date. Technology changes rapidly, and given the many hands-on activities in the course, it’s easy for some steps to become out of date as time passes. I’ve tried to maintain a healthy balance between general and specific details in the content here. If you find something is out of date, either add a comment on that page or let me know.

Stay updated

If you’re following this course, you most likely want to learn more about APIs. I publish regular articles that talk about APIs and strategies for documenting them. You can stay updated about these posts by subscribing to my free newsletter through the form below. My newsletter, branded as the I’d Rather Be Writing newsletter, helps you stay updated about everything going on in the techcomm world, with a special emphasis on API documentation, docs-as-code tools, and lately AI.

Other resources

If you’ve looking for additional resources to learn API documentation as well as tech writing best practices, check out the following:

These resources aren’t API-specific but are still relevant:

For even more books, see Relevant Books from the Write the Docs site.

About Tom Johnson

Tom Johnson

I'm an API technical writer based in the Seattle area. On this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, AI, information architecture, content strategy, writing processes, plain language, tech comm careers, and more. Check out my API documentation course if you're looking for more info about documenting APIs. Or see my posts on AI and AI course section for more on the latest in AI and tech comm.

If you're a technical writer and want to keep on top of the latest trends in the tech comm, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.


« Previous: Course overview