ProductCompareToolsPricingBlog
Sign inCreate an account
  1. Blog
  2. API Documentation

12 API Documentation Examples Worth Copying

Twelve public API docs from Stripe, Twilio, GitHub, Plaid, Resend, Shopify, Linear, Anthropic, Cloudflare, DigitalOcean and Vercel, with the one pattern from each that is worth stealing for your own docs.

Morgan Kotter · Updated December 3, 2026

I build docs tooling, so I spend a lot of time reading other people's API docs. Most are fine. A few are good enough that I keep going back to see how they handled a specific problem: errors, versions, the first five minutes, or how an AI coding assistant reads the page.

Every page below was opened on December 3, 2026, and each section describes what is on that page today, not what it looked like two years ago.

If you want the step-by-step process instead of examples, read how to write API documentation. This post is its companion: less instruction, more "go look at how they did it."

TL;DR

  • Best API reference overall: Stripe. Version-pinned samples, a markdown copy of every page, and docs that change to your account when you log in.
  • Best API changelog: Stripe. Every change is marked Breaking or Non-breaking in its own column.
  • Best quickstart for a messaging API: Twilio. A virtual phone means you can finish without owning a second phone.
  • Best error reference: Twilio. Every code has its own page, and the full list downloads as JSON.
  • Best endpoint layout: GitHub REST. Same sections, same order, on every endpoint.
  • Best sandbox onboarding: Plaid. A runnable sample app plus published test credentials.
  • Best language coverage on a small API: Resend. Ten code tabs on one endpoint.
  • Best GraphQL reference: Shopify. Clear on cost-based rate limits and why errors can come back as 200.
  • Best GraphQL getting-started page: Linear. A first query you can run before you finish reading.
  • Best reference for a fast-moving API: Anthropic. Deprecations and end-of-life dates sit right in the parameter docs.
  • Best for a huge API surface: Cloudflare. SDK versions and install commands up front, then everything grouped by product.
  • Best docs for AI agents: DigitalOcean and Vercel, tied. Both serve a plain markdown version of every page.

Summary table

Example What to copy Page checked
Stripe API reference Version-pinned samples, .md version of each page docs.stripe.com/api
Stripe changelog Breaking / Non-breaking column on every entry docs.stripe.com/changelog
Twilio SMS quickstart Send and receive in one guide, eight languages twilio.com/docs/sms/quickstart/node
Twilio error dictionary One page per error code, JSON download twilio.com/docs/api/errors
GitHub REST API Identical structure on every endpoint docs.github.com/en/rest/repos/repos
Plaid quickstart Sample app plus sandbox credentials on the page plaid.com/docs/quickstart
Resend Ten languages on every request, idempotency up front resend.com/docs/api-reference/emails/send-email
Shopify Admin GraphQL Rate limits and error codes explained for GraphQL shopify.dev/docs/api/admin-graphql
Linear GraphQL Two auth methods, then a runnable viewer query linear.app/developers/graphql
Anthropic Messages API Deprecation dates inline with parameters platform.claude.com/docs/en/api/messages
Cloudflare API SDK versions and installs on the landing page developers.cloudflare.com/api
DigitalOcean and Vercel Markdown copies of pages plus llms.txt docs.digitalocean.com/reference/api/reference, vercel.com/docs/rest-api

1. Stripe API reference

The top of the reference does three things before any endpoint: it gives the base URL (https://api.stripe.com), links the client libraries for Ruby, Python, PHP, Java, Node.js, Go and .NET, and says in one paragraph how the API behaves: resource-oriented URLs, form-encoded request bodies, JSON responses, standard HTTP codes.

The pattern worth copying: samples that are pinned and personal. The request sample for creating a customer includes a Stripe-Version header with the current version, so a copied request behaves the same way next year. The page also says "Log in to see docs with your test key and data," and the key placeholder in the samples is where your own test key goes once you do.

Add .md to a reference URL (for example /api/customers/create.md) and Stripe returns a clean markdown version with the request and the full example response.

Why it works: the reader copies a request and it runs.

Stripe's error codes page is worth a look too: every API error with a code carries a doc_url pointing at its row.

2. Stripe changelog

Stripe's changelog is a table, not a stream of posts. Releases have names (Clover, Dahlia, Endive), and each dated version sits under its release, often with a .preview variant next to the stable one. Every row has four columns: a linked title, the affected products, Breaking change? and a category like api or stripejs.

The pattern worth copying: the Breaking / Non-breaking column. It answers the one question every reader of a changelog has, which is "do I need to change my code," before they click anything.

Why it works: a developer scanning before an upgrade can skip the non-breaking rows and read only the ones that matter.

3. Twilio SMS quickstart

The Twilio SMS quickstart covers both directions in one guide: send an outbound text, then receive and reply to one through a webhook. It has tabs for eight languages (Python, Node.js, PHP, two flavors of C#, Java, Go and Ruby), and the prerequisites change with the tab you pick.

The pattern worth copying: remove the hardware dependency. The guide sends messages to the Twilio Virtual Phone, so you can test both sending and receiving without a second phone or a verified number.

Why it works: the reader gets a real message on a real (virtual) phone in their first session, and the guide ends with next steps on toll-free verification and A2P 10DLC, which is what blocks people from going live.

4. Twilio error dictionary

Twilio's error and warning dictionary is one long page of numbered codes, grouped into ranges like 10000 to 19999 and 20000 to 29999. Each row shows whether it is an ERROR or a WARNING, often the product it belongs to, and a short message. For example, 10001 is "Account is not active."

The pattern worth copying: every code links to its own page at /docs/api/errors/{code}, and the whole list can be downloaded as JSON.

Why it works: a developer who sees an error code in a log can paste it into a search engine and land on a page about exactly that code. We wrote more about that cost in the API documentation mistakes that cost you customers.

5. GitHub REST API

GitHub's repositories page documents dozens of endpoints, and every one follows the same order: method and path, a short description, any "Note" callouts, then Parameters split into Headers, Path and query parameters, and Body parameters, then HTTP response status codes, then Code examples with a request and the response schema.

The pattern worth copying: strict consistency. Each parameter shows its type, whether it is required, a Default: value, and a "Can be one of:" line for enums. Each status code gets a one-line meaning like "404: Resource not found."

Why it works: after reading two endpoints, you know where everything is on the other two hundred. Readers stop scanning the page and jump straight to the section they need.

6. Plaid quickstart

Bank data is hard to demo because nobody wants to connect a real bank account to try an API. Plaid's quickstart solves it with a sandbox and a working app.

You get sandbox keys from the dashboard, install the sample app (the Plaid CLI generates it in Node, Python, Ruby, Go or Java), run it, click "Launch Link" and log in to any institution.

The pattern worth copying: the test credentials are printed right on the page. Username user_good, password pass_good, and if it asks for a 2FA code, enter 1234.

Why it works: the reader goes from zero to a connected test account with real-looking data, then calls endpoints with buttons in the sample app. There is also an intro video and a Postman collection for people who would rather not write code yet.

7. Resend

Resend's Send Email reference shows what good looks like for a small, focused API.

The body parameters are split into required (from, to, subject) and optional, and the limits are stated where you need them: up to 50 recipients in to, 40MB of attachments after Base64 encoding, 256 characters for tag names and values.

The pattern worth copying: the same request in ten tabs: Node.js, PHP, Python, Ruby, Go, Rust, Java, .NET, cURL and the CLI. And the Idempotency-Key header is documented on the send endpoint itself, with its 24-hour expiry, instead of in a separate guide nobody reads until they send a duplicate email.

Why it works: the reader's language is almost certainly there, and the edge cases that cause support tickets are on the page they are already reading. Resend also publishes a llms.txt index, linked from the top of the page.

8. Shopify Admin GraphQL API

GraphQL docs have a specific problem: the conventions REST developers rely on, like status codes, do not carry over cleanly. Shopify's Admin GraphQL reference addresses that directly.

The landing page is pinned to a dated version (2026-10 when I checked), and the version also appears in the endpoint path. Client library tabs cover React Router, Node.js, Ruby, cURL and direct API access.

The pattern worth copying: the sections on rate limits and errors. Shopify explains its cost-based throttling in "cost points" and shows a sample response with the extensions.cost fields. Then it states plainly that GraphQL can return 200 OK for errors that would be 4xx or 5xx in REST, and lists codes like THROTTLED and ACCESS_DENIED.

Why it works: those are the two things that break a GraphQL integration in production, and both are explained before you write your first query.

9. Linear GraphQL API

Linear's getting-started page is short, and you can do something useful after reading the first screen.

It gives the single endpoint (https://api.linear.app/graphql), notes that it supports introspection, then covers two ways to authenticate: OAuth for apps other people will use, and personal API keys for your own scripts. Each has a curl example.

The pattern worth copying: a first query that needs no setup beyond a key. The viewer query returns your own id, name and email, so the very first request tells you whether auth works. From there the page builds up: teams, a team's issues, one issue by ID, then mutations to create and update issues.

Why it works: "who am I" is the best possible first call. It cannot fail for any reason other than auth, so a beginner knows exactly what to fix.

10. Anthropic Messages API

The Messages API reference documents an API that changes often, with new models, new content block types and new tools.

Every body parameter is listed with its type, constraints and a description, and the edge cases are written into the description. max_tokens has a minimum of 0, and the docs explain that setting it to 0 pre-warms the prompt cache.

The pattern worth copying: deprecations live in the reference, not just in an announcement. The model parameter lists its allowed values, and older models are marked Deprecated with their end-of-life dates.

Why it works: a developer checking which model string to use sees, on the same line, whether it is going away and when. The docs also serve an llms.txt.

11. Cloudflare API

Cloudflare's API covers DNS, caching, firewall, email routing, load balancing and much more. The API reference landing page handles that size with two sections.

Libraries comes first. TypeScript, Python, Go and Terraform each get a current version number, an install command (npm install cloudflare, pip install cloudflare) and a link to their docs.

API Overview then groups every endpoint by resource (Accounts, Zones, DNS, SSL, Cache and so on), shows the method and path for each, and marks deprecated ones.

The pattern worth copying: putting SDK versions and install commands on the reference landing page.

Why it works: most readers of a big API never write raw HTTP. Leading with the SDK sends them down the shorter path.

12. DigitalOcean and Vercel: docs for AI agents

I grouped these two because they solve the same problem: an AI coding assistant reading your docs.

DigitalOcean's API reference groups endpoints by category and shows a count beside each (Droplets 19, Databases 71, Monitoring 72), with request samples in cURL, Python, Go and Ruby. Its pages carry a note for AI agents pointing to llms.txt and explaining that any page has a markdown version at the same URL with index.html.md in place of the HTML.

Vercel's REST API reference does something similar. Fetched by a tool, it comes back as markdown with front matter: title, description, a last_updated date, related pages and a vercel docs search command for searching from the CLI. The endpoints are listed in tables per resource (method, path, description), each linking to a .md page.

The pattern worth copying: a machine-readable version of every page, plus an index that says where everything is.

Why it works: more and more of your docs traffic is a model reading on behalf of a developer. Markdown gives a model the endpoint without the navigation and scripts.

Patterns the best API docs share

Looking across all twelve, the same habits keep showing up:

  • A request that runs when copied. Pinned version headers, real base URLs, and a clear placeholder for the key.
  • Samples in the reader's language. Twilio has eight, Resend has ten. Fewer is fine, but cURL alone is not.
  • One layout for every endpoint. GitHub's order (description, parameters, status codes, example) is a safe default.
  • Limits and edge cases on the endpoint page. Max recipients, attachment size, idempotency, what happens when a field is omitted.
  • A first call that only tests auth. Linear's viewer, or any "who am I" endpoint.
  • A sandbox with published test data. Plaid's user_good / pass_good is the model.
  • Errors with their own URLs. Stripe's doc_url, Twilio's page per code.
  • A changelog that flags breaking changes. A column or label, not a sentence buried in a paragraph.
  • Deprecations where the reader looks. Inline on the parameter, with a date.
  • Markdown versions and an llms.txt. Stripe, Resend, Anthropic, DigitalOcean, Cloudflare and Vercel all serve one or both.

Getting these patterns from an OpenAPI spec

Most of this list is expensive to build by hand. Stripe and GitHub have whole teams on their docs. But a lot of it falls straight out of a good OpenAPI file: a page per endpoint with the same layout, parameters with types and enums, response examples, and status codes.

That is the part Specway handles. You paste the URL of your spec and get a hosted site with a page per endpoint, an interactive playground for sending real requests, code samples in cURL, Node, Python, Ruby and PHP, and a changelog that lists every spec update automatically next to posts you write. Every site serves llms.txt and mcp.json, and there is an MCP server so assistants like Claude and Cursor can read your docs directly. The writing still has to come from you: the quickstart, the error explanations, the "why." If you want to see your own spec rendered, sign up and import it.

FAQ

What makes API documentation good?

Good API docs get a developer to a successful request quickly. In practice that means copyable requests that run, samples in their language, a consistent layout across endpoints, clear errors with their own pages, and a changelog that flags breaking changes.

What should an API reference page include?

At minimum: the method and path, a one-paragraph description, authentication requirements, every parameter with its type and whether it is required, a request example, a response example, and the possible status codes. GitHub's REST docs are a clean template for this. The how to write API documentation guide covers each part in more detail.

Are Stripe's docs still the best API documentation example?

For REST references, yes, mostly. Stripe still sets the bar on copyable, version-pinned samples, and its changelog is the clearest I have seen. But other docs beat it in specific areas: Twilio's error dictionary, Plaid's sandbox onboarding, and Linear's first-query experience are better models for those parts.

Do API docs need llms.txt?

It is quickly becoming standard. Six of the eleven companies here serve an llms.txt file or markdown versions of their pages, and coding assistants use them to find the right endpoint without parsing HTML. If your docs come from an OpenAPI spec, generating llms.txt from the same spec keeps it in step with the reference.

Morgan Kotter is a product manager and indie founder in Utah. He spent seven years forward-deployed in enterprise SaaS at Lucid, now Marq, and he builds and runs Specway himself.

Read next

  • OpenAPI vs Swagger: What's the Difference?OpenAPI is the specification. Swagger is its old name and, today, a family of SmartBear tools. Here is the history, the version timeline, and what actually changed between Swagger 2.0 and OpenAPI 3.
  • The True Cost of API Documentation: Build vs Buy AnalysisCustom docs seem free until you count engineering hours, maintenance, and the cost of outdated information. Here is a realistic breakdown.
  • OpenAPI 3.1 vs 3.0: What Changed and Why It MattersOpenAPI 3.1 brought full JSON Schema compatibility, webhooks, and subtle breaking changes. Here is what you need to know before migrating.

See your docs in a minute

Paste the link to your OpenAPI file. Free for one API, no card needed.

Get startedSee pricing

API reference docs from your OpenAPI file.

Product

  • How it works
  • Endpoint pages
  • Code samples
  • Spec sync
  • Spec changes
  • API versions
  • Changelog
  • Recipes
  • Docs assistant
  • Your domain and look
  • Insights
  • Private docs
  • Team SSO
  • Pricing

Compare

  • vs ReadMe
  • vs Mintlify
  • vs Redocly
  • vs Scalar
  • vs Swagger UI
  • Postman alternatives
  • All comparisons

Tools

  • OpenAPI validator
  • OpenAPI diff
  • Swagger 2 to OpenAPI 3
  • cURL to code
  • JWT decoder
  • YAML and JSON
  • llms.txt generator
  • All tools

Resources

  • Guides
  • OpenAPI errors
  • Glossary
  • Public APIs directory
  • Blog
  • Help
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact
  • Privacy
  • Terms

© 2026 Specway. Made in Utah by Modlific LLC.

GitHubXLinkedIn